Glitch Garden Enemy Spawn Logic


Hello Everyone! I’m extending my Glitch Garden a bit by adding some more attackers/defenders/difficulty settings-modifiers and whatnot and one thing that’s given me a bit of trouble is the attacker spawning logic. I’ve found that sometimes the script supplied by the course works perfectly and feels balanced in the ways that I’d like yet random, however an equal amount of time I will get three attackers spawned within a few seconds of each other and then maybe 10-20 seconds of no spawns. I’m curious if anyone has come up with their own logic for handling attacker spawning?


You can use coroutine or invokerepeat method to make a sequence of enemies.