Why can I not spawn an actor after a delay?
I have created a blueprint called "EnemyCharacter" using the third person template. It follows the player and attacks them. However, I now want to make the enemy respawn after being killed. My logic for this is shown in the following screenshot.
After an enemy dies, it is destroyed using "DestroyActor". After a 1 second delay, "SpawnActor" is called to create a new enemy in the same position where the previous one died. However, the "SpawnActor" function fails to spawn a new enemy when the delay is used. If I remove the delay and go straight from "DestroyActor" to "SpawnActor", the enemy appears properly. Why does this happen and how can I allow the blueprint to use a delay properly?
asked Feb 01 '16 at 04:36 PM in Blueprint Scripting
you are destroying the BP (in this case your EnemyBP) that execute the Delay and the Spawn. That because never occur. When you destroy
You need do this in other BP, example a BP that control how many enemys in level...
Or spawn the actor before, hidde/deactivate it, activate delay in the new actor for unhidde /active and then destroy the old actor.
or other safe way...
Follow this question
Once you sign in you will be able to subscribe for any updates here