I've been working on my new project and stuck in this problem
so, I don't know if this have been asked before (I couldn't find it), how can I limit the number of object inside the layout?? or more specific, inside the screen?
the idea is every x second enemy is spawned, and as long as not destroyed, they remain there, chasing the main character, and attack. And if we play long enough, the number of enemies will be awful.
I come up with an idea to limit it using variable, so it won't spawn unless the variable is not met. But it will take time if I have various type of enemy and limit them for each type. Maybe there's another way?? simpler way to do it
thanks in advance