0 votes

So my character have an attack sequence, i set the emitting particle to true, but it works only on first attack, and not in the others, maybe this happen because of it is set to true now? So what is the best method to use particles system? I use the activate/deactivate method? Or maybe i create a scene for the particle and instantiate him in the moments i want, and destroying after?

in Engine by (16 points)

1 Answer

0 votes

Its always better to reuse but it has its limitations.

If you need parallel instances e.g. one is not finished emittinh yet and you want to start a new one (emitter lasts longer than buffer time of attacks) its better to instance a new object.
If you want to override the material in case it hits a different surface (e.g. enemy instead of wall) its more convenient to create a new object so you dont have to change it back every time.

So my suggestion is create a new object every time as it gives you more flexibility. And if you realize you dont need parallel emitters you can always go back to reusing.

And dont forget to dequeue instances you dont need anymore.

by (709 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.