i want to add a new enemy instance everytime one enemy dies

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By sabito

so basically i have an endless runner 2d where the player faces one enemy, after i kill it i want another enemy to spawn and i dont know how to do this so i was wondering what would be the easiest way to approach this problem, i dont need the code, i just need the basic idea of what i should do

:bust_in_silhouette: Reply From: VGenesis

You can make the enemy spawn another enemy on death, or before the queue_free() function. If you’re going to have exclusively one enemy in the scene this might be the easiest and most optimal way.