Topic was automatically imported from the old Question2Answer platform.
Asked By
pferft
Hi everyone,
get_node("Area2D").input_pickable = false works. get_tree().get_nodes_in_group("all-area2d-nodes").input_pickable = false doesn’t.
How can I make such a group (un)pickable?
Just iterate through each node in the group and set the input_pickable property. So, something like:
for node in get_tree().get_nodes_in_group("all-area2d-nodes"):
node.input_pickable = false;
Perfect, thank you!
(Potentially stupid: this “;” isn’t really necessary, is it?)
pferft | 2020-11-18 16:41
Correct, the ; is not required in gdscript (though it is tolerated). It is required by many C-based languages, and my fingers tend to automatically add it if I’m not careful…