0 votes

I want queue_free() to return to the previous value, that is to say that the node is no longer eliminated and is visible again. when I stable the varlor
queue_free() the node is removed but I don't know how to redo it and return to the original state

in Engine by (185 points)

What is it that you are trying to do ? Maybe we can come up with another solution. As far as I know, I don't think queue free can be undone

This might help > https://godotengine.org/qa/49429/what-is-difference-queue_free-and-remove_child-what-queue?show=49429#q49429

Also return means the datatype (and value) that the method retrieves. queue_free returns void because it executes an action rather than give you a value to work with like get_nodes_in_group which returns an array.

5 Answers

0 votes

Remove your node from a parent if you want to reuse it latter, do not queue_free() it.

by (200 points)
0 votes

so how do i do it? to remove a node and then be back

by (185 points)

stop posting comments as answers, please

0 votes

Use remove_child() and add_child() functions.

by (33 points)
0 votes

and then return to the previous state that is to say redo the deletion?

by (185 points)

stop posting comments as answers, please

0 votes

If you only want to display or undisplay a node, use the property visible of the node.

get_node().set_visible()

or

get.node().visible =
by (33 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 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 webmaster@godotengine.org with your username.