Hello everyone! I was working on my spawn algorithm for enemies and come up with the question. Wchich way is the best to actually spawn them in Unreal Engine 4? I want to describe my situation. In my game there are a lot of moments when enemies spawn constantly, for example there are always more then five enemies (aka AI Actors) on the level. To keep them always on map I got an algorithm but I don't know how I should do it properly. There are two ways that I found out:
- Just a normal lifecycle: enemy spawns, he dies from player and actor and controller get destroyed.
- A little bit tricky. I spawn a good amount of enemies at the begging of level at one hided place (for example 20 enemies under the map). Thaen I spawn some amount of them and after death instead of being destroyed Actor returns to his initial place and wait till his next spawn.
I don't know which way is better from technical point that's why I can't decide which one to use. But my algorithm can handle both of them.