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
@sancho2
thats what i also thought but its not the case. If you further utilize the values, the outcome is different. Although if you print out the arrays, you get the same result, which confuses me and makes it hard to understand.
edit: i figured it out, the issue wasnt with get_children()