how to get the signal sender when connect by the editor

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By alexzheng
:warning: Old Version Published before Godot 3 was released.

in the callback of signal, there’s no way to get the sender of the signal unless connect by code and bind the sender .
I wonder why the sender is missed by default in Godot.

hm… as just quick guess, every callback function should have a parameter for sender than, even though it’s really unnecessary.
I think you know how to get which sender emits the signal, what bothers you to use script to connect signal?

volzhs | 2017-04-10 14:15

what bothers you to use script to connect signal?
lazy :slight_smile:

alexzheng | 2017-04-11 03:10

all technologies have event dispatchers references passed automatically. It’s weird we have to define a new signal to have access to it…

LionH | 2019-07-16 08:26

:bust_in_silhouette: Reply From: eons

Connection window allow extra bindings but these are constant values, since these connections are made by hand on the editor you don’t need the path or ID, you know what is connecting.

Like, you have 2 areas, bind one with the integer 1, the other with 2, you made it and you know which is which to process the callback.

You have to redefine new signal to pass extra parameters. Understood. But in my case, The event body_entered triggered have only one parameter (the body that has entered the area and have no way to know on which Area has entered…

LionH | 2019-07-16 08:28