This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

Hey folks,

i would like to know how exactly i can delete/queue_free an instanced CPUParticles2D Scene (See Screenshot below for Setup/Script of Scene)?
I simply cannot make that work as with other nodes..

Problem: I'm making a spaceshooter where i instance that exploding-scene on a shot "explodes" (particles emitting points) -> i instance that (particles-)scene at the position of the enemy....but the queue_free() on that particle-scene doesn't do anything, i can still see the remaining CPUParticles2D-Instances in the Remote-Debugging-Window no matter what i do.
Even if i force it, calling "free()" - does not free it.

What is a better approach of dealing with emitting particles on multiple positions at the same time or "deleting" that nodes?

(I searched the net and found an answer that i should keep "the" emitter and just change the position....but the problem remains that if i have a lot of enemies that explode at the same time, i need to instance multiple CPUParticles2D at the same time)

Setup Exploding-Scene: Particles2D-Setup

Thank you in advance!

in Engine by (41 points)
retagged by

Works fine for me. Can you provide an example project?

1 Answer

0 votes

Found a solution: I just needed to make a "Node2D" as parent and queue_free() that...than it works...thank you kindly for reading.

by (41 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.