#assigned value when this script is instanced.
#var nodeA = self.get_child(0)
#assigned value after the Node2D
#has entered the tree. Children load first.
onready var nodeB = self.get_child(0)
func _ready():
var nodeA = self.get_child(0)
print("var: ", nodeA)
print("onready var: ", nodeB)
...
https://www.youtube.com/watch?v=tvogJJPrIfk