I am currently trying to use the "get_node" method to identify a path to the first of many child nodes (which are also instanced nodes) within a node that is an instanced scene from my main scene. Here is an example of my tree:
Main
--Sprite
--Inventory(Instanced Scene, location of script in question)
--Control
--Item1(Instanced Scene)
--Item2(Instanced Scene)
--Item3(Instanced Scene)
Now in my script located on the inventory node I attempt to locate Item1 by using
while i < inv_keys.size():
currNode = get_node("Control").get_child(i) <--error
currNode.get_child(0).set_text(masterList[currItem][0])
i = i+1
(inv_keys is an array of size 2 here lets say..less than number of instanced item scenes I currently have)
I keep getting an error "Attempt to call function 'getchild' in base 'null instance' on a 'null instance' which I have since determined indicates I am trying to call getchild on a node that does not exist.
I have tried all different ways to path to this first node including referencing all the way back to the root node and then without looping and continue to get this error. Is there another way I am supposed to identify this/these nodes (because they are instanced?)
Any help would be very much appreciated, thank you!