Spawning Enemies from multiple Spawners, with limited amount. (Request by redditor)
Hi everybody!
u/Hip_Hop_Pirate made a post where he asked about his spawning setup not working properly. I offered to send him my screenshots, but thought maybe somebody could use this aswell.
-
This setup lets you spawn an amount of enemies (that you can define) from multiple spawners in the world.
-
It's possible to have every spawner to be off different size aswell.
-
The enemies get spawned randomly over an area.
-
You can define how fast they spawn.
If you were to make a custom Event, you could also make the enemies spawn only during a certain situation, etc.
Anyway, if there are questions, feel free to ask.
Also, if you have anything to correct or improve, feel free to comment on here.
Hope this helps a few people!
The setup: https://imgur.com/a/oGop5
Posted Dec 12, 2017, 4:02 PM UTC
Just be careful when using multiple spawners in one level with "Get All Actors Of Class". Since all the spawners don't share a max count check it could be that when you do the "Get All Actors Of Class" check, the amount went up after the check, Spawning additional AI.
I don't think this should happen on small levels or with basic AI, but when you have a large level containing a lot of actors. The method "Get All Actors Of Class" becomes increasingly expensive.
Not only that but the construction of the AI could be super complex and take long to spawn, in this case multiple enemies could be in the construction phase, whilst the check triggers again. spawning additional AI.
Hmm I see...
Is there a better setup if you want to have a lot of spawners and enemies?
Say, 20 spawners, 1'500 enemies.