[Solved] Limit the number of spawned objects?

I have a game similar to the Tank Game in the one of the tutorials except the player can move around freely across the map. I have enemies that spawn and their spawn rate increases as time goes on. How can I limit the number of enemy objects spawned? Is there a way to check the number of game objects spawned of a specific type. Like lets say I am spawning an object called ET1 multiple times, can I check with something similar to “IF ET1.ObjectCount is greater than 100 then delete one ET1”.

Thanks!


3 Likes

Thank you so much Slash!