well.. you can't play with c2's editor source, but you can edit export source..
go to install directory of C2 (default c:/program files/construct 2) and open folder exporters/html5.
you will find there - > c2-externs, common prelude, commonace, eveng, expressions, glwrap, layout, system and a few other JS files.
they are the source code of your game that gets put in runtime.js -> it's combined depending on your choices and complexity of your game.
i've been tweaking that, but C2 (ashley) won't give you support if you tamper with it, so you're on your own.
also there are folders in that folder called "plugins" and "behaviours", which have all the JS files (runtime.js / edittime.js) from which runtime.js gets incorporated in that runtime.js file (depending on what plugins / behaviours you use) and edittime - > what is shown / can be edited in editor.
again tampering the default plugins you won't get any support.
i've done some work on those too, things could work better somewhere but ashley just doesn't have time for such massive rework/optimizations and i'm not really a high JS expert nor do i have really the time, and whatever you "change" they won't accept to incorporate in code because it might cause issues.
other than that, most of your events and stuff gets exported to data.js where you won't understand anything because it's just concatenated together.
in the end you don't have to work on those because with good optimization and correct usage your game will work good no matter how big it is.
now to answer your original question:
- i set speed when i choose animation. you can make a function that gets the object from family for example and then sets its speed to designated value, so you won't have to write the same code 100 times, just once.
for example - > function (family, animation,speed) - > set animation on family; set speed on animation; return;
- what do you mean importing 40 ss? in sprite editor? 1 by 1
- same as first. organize your game. here's an example:
turret defense - you got 5 turrets, all different abilities. what are their common properties? fire range, damage, health(maybe), cooldown time, level, etc.. you put those 5 turrent in a family, give that family those properties and voila all your turrets got these properties.
so what happens when you want to level up a turret? all you need is a function which receives a family item. for example - >
function Level (family turret) - > if(turret ==family.smallcanon) - > if (level == 3) return; else level= level +1; ..increase stats...
if (turret == family.bigcanon) - > if (level == 10) return; else level = level +1, increase other stats...
and so on..
if you need a new type of turret - > you just have to change that function, add another if which takes that new turret and changes it's stats, and all you have to do is put the sprite in the family.
ofc this is an easy example, you can do a lot more with functions and families. grouping is the way to go :=) think of your game first then develop