How do I spawn an object at random times repeatedly? SOLVED IN OTHER THREAD


I’m trying to make an object appear at random times during the level.

While I can make the object appear once, it doesn’t appear again during game play. I think there’s something keeping the timer from replaying, but I can’t figure out what.

Any suggestions?


Why don’t you just count the number of enemies instead of use of a variable.
Use Advanced-> Compare Two numbers
then add
Count(FrontEnemy) > 0 That means at least 1 enemy is in the level.
Count(FrontEnemy) <= 0 That means there is no Frontenemy object in the level.
With this you only need to set a timer that starts one time and keeps running until the number of enemies that you want to spawn.

I mean
Any Action with Trigger Once or most probably at the Begin of the scene
Timer “StartSpawn”

If the timer “StartSpawn” is greater than 3 sec
Count(FrontEnemy) < 10
Action: Create enemy…

Edit: I think in your events you’re resetting Diana timer in the repeat so that only happen one time


Thanks for the ideas, but neither worked.