I’m trying to make a topdown shooter, where the player resides in the center of the layout. Surrounded by attacking zombie sprites. Player moves mouse and shoots to survive.
After watching How To Make A Game with GDevelop - Levels (E09) … I changed my current_level to a global variable. but my spawn_num (variable) remains a scene variable = only because the scene never changes (is this correct?)
HOW DO I set the number of zombies to spawn per level?
There is extension called ObjectSpawner
Which spawns whatever objects wherever you want with frequency you want and you can adjust all that via events
You can even control how many objects each spawner can spawn
For example you can set that spawner can’t spawn another object if there are already exist 5 objects spawned by that spawner
Very easy to use
So all you would need to care about now is to setting up variables
Where you simply could count how many objects you deleted to change wave
Like when you have event where you delete enemy object you add action to it to add +1 to some variable for example GlobalVariable(EnemyKillCount)
And now you prepare events with condition that if GlobalVariable(EnemyKillCount) is less than < 21
You are at wave 1
And do all your spawning logic for wave one
Then if enemy same variable is grater than > 20
but less than < 41
You are at wave 2
And so go on
In addition to the recommendations already given to you, I suggest crafting an external events sheet to encompass all the unchanging level mechanics. Link this events sheet to the events within each level. This will enable you to tweak scene variables that wield influence over global events defined in the external events sheet.