I need help with enemy spawning and timers
Hello, I'm working on my first game and I want to make it an enemy wave survival, but I just got stuck in the part where I make the enemies spawn at the beginning of each wave, and I couldn't find anything that could help me on the internet so I created an account to ask you guys.
I need to know how to make a fixed amount of enemies spawn at the same time in the same or different locations when the timer goes to 0, and then make the game to wait until the player has defeated them all, and then the timer would reset and when it reaches 0 more enemies than before will spawn, and so on and so forth.
What happens to me is that when the timer reaches 0 the enemies start to spawn infinitely until the max object limit has been reached, and I'm left with 900+ enemies chasing me.
If you know how to fix this issue please answer.
Thank you!