Download

Enemy wave ...

Hi,

I’m trying to do an enemy waves for days and I can’t find how.

Here’s what I want to do.

There is 2 spawn points.

The game start, spawn point 1 make the enemies spawn (10 enemies).
Then, 20 sec after, the spawn point 2 make the enemies spawn (10 enemies).

I have two problems :

  • How can I wait 1 sec between each enemy ? I made a loop like “for 1 to 10 => spawn actor”, but the delay function doesn’t work in a loop.
  • How can I wait between the 2 waves. I started to work in the level blueprint and want to do something like “spawn1->beginWave”, wait 10 sec, and then “spawn2->beginWave”. But I can’t get each spawn (unless with a loop and tag, but it seems a lot of work for each wave… but maybe it’s the solution)

The exemple of “strategy game” is kind of what I want, but it’s in C++. If someone have this on blueprint, thanks a lot :slight_smile:

Thanks a lot if you can help me :slight_smile:

Well I’d keep anything as modular as possible, hence make a wave spawner an actor (that maybe also functions as a spawn point).

Then just keep enemy type and count as variables and spawn them but not in a loop! Instead just spawn them, increment a variable that keeps track of how many enemies have been spawned and then use a timer to spawn the next one.

Maybe, just maybe you also want to create an actor that manages your spawns of wave spawners, like a wave manager of some sort.

Thanks for your answer, i thought of this solution but if i have 10 types of ennemy, i rather make a generic spawner. If I want a big wave of 30 enemies, it will be a long blueprint :slight_smile:

If nobody have an other solution, I’ll do tha. Thanks :slight_smile:

Well, you can use a enemy class variable and make it public, this way you can change it after you dropped it into the level.

Not sure if it’ll be helpful since it’s a lot more like a DMC, Kingdom Hearts like spawner but I’ve made a video tut of how I created the spawners for my game…