How do I make queue_free() become false

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

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

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

Scavex | 2020-09-15 08:43

This might help > https://forum.godotengine.org/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.

Magso | 2020-09-15 22:37

:bust_in_silhouette: Reply From: Reloecc

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

:bust_in_silhouette: Reply From: lalel345

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

stop posting comments as answers, please

Reloecc | 2020-09-15 18:25

:bust_in_silhouette: Reply From: Koroshiya

Use remove_child() and add_child() functions.

:bust_in_silhouette: Reply From: lalel345

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

stop posting comments as answers, please

Reloecc | 2020-09-15 18:25

:bust_in_silhouette: Reply From: Koroshiya

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 =