Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | gonzalezharry |
So, I’ve got the following code inside my script:
for i in multiples_ids:
var multi = instance_from_id(i)
multi.connect("not_touched", self, "multi_is_untouched(multi)")
func multi_is_untouched(multi):
if multi.get_node("Area2D").overlaps_area($Hole3/Area2D):
move_multi_to_respos(multi)
However, when the multi object emits the signal “not_touched”, nothing happens.
I can see this error in the debugger:
emit_signal: Error calling method from signal ‘not_touched’: ‘Node(Main.gd)::multi_is_untouched(multi)’: Method not found…
<C++ Source> core/object.cpp:1242 @ emit_signal()
Multiple.gd:29 @ _unhandled_input()
Since I have 3 multis instantiated, I find it important for the move_multi_to_respos() function to have a reference to the multi emitting the signal. (I could make a workaround in case the signal can’t pass the argument through the function, though)
Any advice?