Use a game attribute that you increase the number spawning based on the level or wave it is currently on.
So lets say your first wave is only one. So make a game attribute and call it Spawn Num as an integer and give it 1. Then lets say you have another game integer called Wave Num and assign it 1 as well.
Then put it somewhere in one actor where Spawn Num is set to Wave Num (you can also do a little math if you want it altered to a different num for example Wave Num squared +3 /2 or something odd like that. It will keep it every changing and you wont have to make any modifications. Be sure to increment Wave Num after each wave though.
Create another attribute to keep track of the number of enemies you have. Something like
game.Num Enemies to game.Num Enemies+1
Set that up in whichever actor that is controlling the spawning if they are spawning individually.
If you use the code idea I gave you above and if they are all spawning at once you can just set Num Enemies = to Spawn Num. Then in the actor in which they are being destroyed when hit or whatever have Num Enemies-1. Then in an actor when Num Enemies = 0 change scenes or whatever and have Wave Num +1
** Depending on when they are spawning you may need to set up another attribute to make sure that its not checking if it is 0 prior to them spawning or it will keep skipping through scenes. So you may need a boolean checking if the scene is loading and once it loads its set to false and then it can check when it is 0. If all that makes sense.
Yes just use the spawn actor behavior to spawn the enemies. I usually create just one spawner actor and place it outside the screen. Then just set randoms to tell it where outside the screen to spawn the actors. It looks good. Good work.
Comments
So lets say your first wave is only one. So make a game attribute and call it Spawn Num as an integer and give it 1. Then lets say you have another game integer called Wave Num and assign it 1 as well.
Then put it somewhere in one actor where Spawn Num is set to Wave Num (you can also do a little math if you want it altered to a different num for example Wave Num squared +3 /2 or something odd like that. It will keep it every changing and you wont have to make any modifications. Be sure to increment Wave Num after each wave though.
game.Num Enemies to game.Num Enemies+1
Set that up in whichever actor that is controlling the spawning if they are spawning individually.
If you use the code idea I gave you above and if they are all spawning at once you can just set Num Enemies = to Spawn Num. Then in the actor in which they are being destroyed when hit or whatever have Num Enemies-1. Then in an actor when Num Enemies = 0 change scenes or whatever and have Wave Num +1
** Depending on when they are spawning you may need to set up another attribute to make sure that its not checking if it is 0 prior to them spawning or it will keep skipping through scenes. So you may need a boolean checking if the scene is loading and once it loads its set to false and then it can check when it is 0. If all that makes sense.
Here is the update video: