Topic was automatically imported from the old Question2Answer platform.
Asked By
Shortanel
Ok so I work at a space shooter and i want to restart the scene after the player gets destroyed and the explosion animation is finished but I don’t want to make a separate scene with a explosion just for the player how i looked it was done on a tutorial but on the timeout signal of the timer node of the explosion i want to check if the signal for destroying the player was emitted and then restart the scene after the animation for explosion was finished. It is possible? it is a method or something capable of doing that?
Thank you in advance and sorry for bad english:).
I don’t know how exacly you are organizing your animations and states, but there is a function called “yield”, that should allows you do what you want.
You can use it in many ways, and you can check it here
To call a function after an animation ends, you do:
Yes it is possible. The Timer Node has a signal on the Signal Tab between the Inspector Tab called “timout”. If you connect the signal to your code it execute the code if the Animation is finished. It should look like that :