So yeah, i’m making a game again. there’s a problem tho. I need the generated enemies to be called enemy1 enemy2 enemy3 and so on.
the code returns enemy0 every single time “maker” is executed. what am i doing wrong here? D:
Code:
laufen = "enemy"+i;
function maker() {
duplicateMovieClip("enemy", "enemy"+i, _root.getNextHighestDepth());
trace(laufen);
}
ID = setInterval(maker, 1000);
Yes enemy is on the stage and is being duplicated.