Singel Particle Burst on _exit_tree()

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Scayze
:warning: Old Version Published before Godot 3 was released.

Hey everyone!
Is it possible to create an single ParticleBurst in the exit_tree() function?
I was trying to, and created a Particles2D node in said function, set all the values and added it as child, and was hoping the first burst would release before the object was getting destroyed. i was wrong. is there another way to do it?

Like adding/moving the particle emitter to, maybe, the parent of the node exiting the tree?

eons | 2016-11-02 01:22

:bust_in_silhouette: Reply From: avencherus

No, not inside a script attached to the particle itself. It will be exiting memory.

Your particle emitter will have to be global or existing in a node that is in memory when you want it to happen. Call the burst, and if you really need to clean it up you can remove it after its finished.