Updating Particles2D Amount removes visible particles

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By findaeden

Hello. I was working on a system where the player’s speed would change how many particles are generated. I wrote the code and it works perfectly, except that everytime the player’s speed is updated, all the existing particles are instantly deleted. Is there a way to change that? Thanks in advance.

I had this same problem too a while back. I know this doesn’t answer any questions, but my solution was to avoid it entirely.

I have an idea though: what if you stop the Particle2D node from emitting, change the amount, and turn on emitting again in the same frame? I haven’t tried this, so sorry if it doesn’t work.

TheJokingJack | 2021-02-15 20:51

I update the Particles2D node.

findaeden | 2021-02-15 20:58

So it worked?

TheJokingJack | 2021-02-15 21:34

I think you should instance new particle system when you update values

Vikrant | 2021-02-17 04:18