To pass additional arguments in a signal, you need to use syntax like this:
func _ready():
example.connect("signal", this, "signal_function", ["extra argument"])
func signal_function(extra):
print ("hello world!")
print (extra)
One thing to note though is if the node already has an argument as part of the signal, like the on_body_entered
signal on the Area node, you will need to include the base arguments in the signal and any additional arguments:
func _ready():
get_node("Area").connect("body_entered", self, "on_body_entered", ["example"])
func on_body_entered(body, extra):
print ("Found ", body.name, "!")
print (extra)
So in the case of adding run
, it should be connectable using something like this:
new_dialog.connect("dialogic_signal", self, '_changeAni', ["run"])