hello i am making a 2d game where i want to spawn enemy but with the condition that when the character shoots the enemy and enemy die then and then only it has to respawn but here the enemy respawn with the time i had tried to use is enemy dead variable from the enemy blueprint into spawner blueprint.
Hello! There are probably many ways to achieve the effect you are looking for, this is simply the first approach that came to mind while reading your issue:
if you are trying to spawn the exact same enemy you could create an Array of “defeated enemies” that starts empty and every time you kill an enemy, you add it to that array.
the spawner after the timer checks the array to see if its empty, if its not then it spawns the enemies within the array and removes them from it.
You may be able to achieve the same by simply using a variable that counts how many enemies are defeated, adding a +1 every time an enemy dies and a -1 every time an enemy spawns and telling the spawner to only spawn enemies if that variable is higher than 0.
hopefully you find these ideas useful let me know how it turn out!