I am attempting to build a wave system, I have an enemy spawn on begin play but not sure how to make another spawn when that specific enemy dies. Any ideas?
Ok is there a better way to do this? Its spawning enemy, checking to see if it is dead and if true it starts next wave. It works but I feel like my method is no good.
Does each wave consist of a single enemy or multiple enemies? Have the death enemy broadcast his demise or bind its death event to the interested party or …
I’d probably create a central enemy spawner/controller blueprint that controls all timing between waves and enemy spawning/destroying. Then you could implement spawning new waves from its EventTick() and a timer. Then when it spawns a new enemy pass a set of useful details to it such as an id, wavenum, spawnpoint, plus a reference to self (the spawner blueprint). Then when an enemy actor dies call its destroyed() function. In that function call the spawner blueprint enemydestroyed(enemyid, spawnpoint, wavenum) function. Then that spawner blueprint function can destroy the enemy actor and spawn a new one as it has all the data needed to know where to spawn it, what type to spawn, and whether it triggers a new wave, etc…
Thank you for the response! So I have a setup similar to what March45 mentioned. I have a blueprint in the level that acts as a wave controller. It spawns my enemy characters. Everything works great. Im still learning by trial so I will probably share my next steps.