You just have to connect the signal to the scene.
So in the scene script you will have something like this:
func foo():
$mynode.connect("_my_signal", self, "my_handler_method")
So that everytime the node mynode
will fire the signal, the scene will catch it and run the my_handler_method()
method.
Note: you could also connect it from the child node, so that in its script you will have:
func foo():
connect("_my_signal", get_parent(), "my_handler_method")
Of course the my_handler_method()
has to be in the scene node, not in the child node.
Though in my opinion the first version is cleaner than the latter, but they both work.
You can check the engine docs about the connect()
method for more information.