E
Emberex
Guest
I have this code where I want an instance to be created as long as the circumstances are met. This is the code:
I understand why the instance is not being created. The
is being reset back to zero too fast. I was hoping to use a local variable for this to save variables and usage. So, how do you go around this situation, or, do you not?
GML:
if(hAmount < hMax){
var spawnCounter = 0;
spawnCounter += 1;
if(spawnCounter >= 3*room_speed){
var sRange = irandom_range(65,80);
instance_create_layer(x + sRange,y + sRange,"Instances", oHuman);
}
}
GML:
Var spawnCounter