Download

Waves of enemies in blueprint - help

I’m trying to create a top down game where the player must survive against three waves of enemies. The only problem is that I don’t know how to create waves of enemies. I’ve looked at the tower defense example but I can’t understand some of it - how do the enemies know where to spawn etc. Can anyone help?

Enemies know where to spawn based on the location of a reference object’s location or a xyz coordinate specified and connected into ‘Spawn actor by class’ node. You should watch the vids concerning spawning https://www.youtube.com/watch?v=vtcWrcscXos&list=PLfZBSwHpypjCexd32QHDOFa12sEgYi5LE

variables needed:
int ‘currentWave’
int ‘maxWaves’
int ‘enemiesPerWave’
int ‘enemiesKilled’

From the event begin play of the game blueprint, initialize variables with default values, use a for loop to spawn enemy characters at spawn locations until you have reached ‘enemiesPerWave’, spawn the player, set currentWave to 1. When a player kills an enemy add 1 to ‘enemiesKilled’ and use a branch to check if ‘enemiesKilled’ is equal to ‘enemiesPerWave’. If so, then add 1 to current wave, use a branch to check whether we are equal to max waves, if so then game win, otherwise loop and set enemiesKilled to 0 and spawn enemies.

Blueprint ScreenShot

I know this is an old thread but If you could please post a screenshot of the blueprint code you described above that would be awesome. Thanks.

if it’s any help I’ve a video tut of the Spawner from my game…it’s a lot more DMC, Kingdom Hearts style but still may be of some use…