No.
When the game starts a couple of global variables are set.
The quantity of animals to spawn - between 1 and 10. (howMany)
A variable that selects which animal is used based on an array. (whichAnimal)
This quantity of animals need to be spawned consequetively, not all at once. Ideally, once every 0.5 seconds until they are all there.
I have a spawn function that creates the right animal in a random location, right now it is repeated for the quantity.
It is triggered on "on loader complete" because i cannot find another trigger to get it to run.
The idea is that a random number of animal sprites are created at the start of the game. They can be of a number of different types. Right now they all appear suddenly, I would like to have them appear individually one after another. This is a counting game for children.
How can i set up the calls to the spawn function to take place in sequence.
For example
for(howMany){
spawnAnimal();
wait(0.5 seconds)
}
If i do anythying like this there is no limit to the spawning. The loop does not end.
Only by calling "On loader layout complete" -> Function Call spawnAnimal()" do i get the limit on the amount spawned. It calls it once. Then i use Repeat (howMany) to repeat the call for the number of animals i want.
Also if i add any kind of wait to the function or the call, it is simply ignored.
How can i add a condition somewhere to do this with a time delay until a condition is met or for each instance until there are "howMany" on screen.