Godot Version
4.3
Question
I have my code properly running with this:
var arr = []
for x in some_node.get_children():
arr.append(x)
but instead of a for loop, i need individually add nodes in the array, so i do this:
var arr = []
arr.append($node1/node_one)
arr.append($node2/node_two)
As simple as i thought it would be, my code breaks at this point.
It has something to do with “get_node fetches the node by NodePath” and get_children returns an array.
But i cant figure it out. I get all the child nodes from a parent node with get_children() and append them into the array. Where is the “returned array by get_children()” here?
How to get the same result by adding nodes individually without the loop and get_children? I need help