What do you mean by reset timer?
I would like enemy waves to spawn every 5 seconds⌠I canât get it to work
An entire wave every 5 seconds? Do you want all of the wave spawned at once?
You could use a timer to change the wave and a timer to spawn them unless theyâre being spawned all at once to different positions.
To spawn them all at once you could use a While event.
Using the timer
When elapsed time > 5 seconds
Set the remaining value
While remaining > 0
⌠Spawn an object at a random location
⌠Decrease the remaining variable
Restart the timer
Be careful with the while event. If remaining doesnât reach zero, it can cause an infinite loop. Just make sure to decrease the remaining count inside the event.
I donât know if I explained myself well.
I would like what happens in this event to be managed autonomously with the timer without having to push the button.
It seems silly but Iâm going crazy.
If I set a timer, only one enemy is created
Because you arenât looping to create more enemies:
so i have to use âwhile conditionâ?
could you please show me where Iâm going wrong?
yes, you need a loop to create more than one enemy. In this case a while with condition âremaining > 0â is appropriate.
inside the loop a. spawn your next enemy from the array (or whatever struct)
b. reduce the var âremaining - 1â
Iâm not very familiar with this action⌠kindly follow the wetransfer above and you will find the project link
can you show me how to do it
please
If youâre just trying to replace the button then you can remove the button condition and replace it with another timer
if elapsed > 5 of Wavetimer
restart waveTimer
Start/reset spawn timer
Just be sure to start the Wavetimer at some point like at the beginning.
Another option would be to restart the wave or wave timer after the remaining variable is 0. As the waves take longer to spawn, IDK if 5 seconds is enough time to spawn them all. You might want to wait until after all objects are swawned to restart the timer. If thatâs the case make sure you use a trigger once on the 1st timer. And then restart it when the Remaining=0. This would insert a delay between waves.
I tried adding a timer but this is what happens.
I put 5 seconds in the timer just to test if it works then obviously I will extend the time between one wave and the other.

I think this is roughly what @Keith_1357 was suggesting:
Created with these events:
Does that do what youâre after?
You are, but youâre spawning the enemies on top of each other, and you only see the last one spawned. Notice how my âcreate enemy
â action adds an x & y randomness to the spawn point, so thereâs less overlap:
ah ok they were overlapping thank you very much to everyone for your availability and patience