a) works in Windows;
c) works fine in HTML5 Debug mode;
and d) seems to do impossible things.
This is code in a Step function for a Spawner I made:
myTimer += 1;
if (myTimer >= myRate){
if (toSpawn){ //if the object I'm going to spawn exists...
if (instance_number(toSpawn) < 6){
spawn = instance_create(x,y,toSpawn);
spawn.targetX = nextTarget.x;
spawn.targetY = nextTarget.y;
spawn.onTrack = true;
}
}
myTimer = 0;
show_message("SPAWN!");
}As it is, it spawns 6 guys right away, the first time myTimer's value reaches that of myRate (30). Even though I set myTimer down to 0 IN the If. If I change the first 'if' to
if (myTimer == myRate)it will spawn exactly 1 guy, and never again any more ever, even if I destroy the one guy. So, it's doubly broken. Not to mention the fact that it won't show the show_message message ever. It seriously seems to be skipping over parts of my code, whenever it likes. Someone tell me what's going wrong, or at least if it's my fault? ;_;











