I have two nodes, one is the child of another. I want to get the child node at parent's script and call one of the child's functions.
At the script of generator I have:
var exp_node = get_node("expand_node")
expand() function is defined and doesn't require any arguments.
However, when I run this scene, the code runs until
exp_node.expand() and gives this error at that point:
Invalid call. Nonexistent function 'expand' in base 'Node2D'.
When I inspect the exp_node in debugger I see that it is a Node2D object, without any scripts attached.
How can I call a script of the child node?