Studio › Manual › Studio kit

Signals

Signals are a way for objects to tell others something happened without knowing who listens.

signal("died");                              // in Create: what this object sends
emit("died", score);                         // when it happens
connect(player, "died", on_player_died);     // a method of the listener
disconnect(player, "died", on_player_died);

Connections can also be made in the inspector's Signals section, one per line: died -> obj_hud.on_player_died. The target is an object (all its instances), group:<name> or self; the method is looked up when the signal fires. Connections to an instance that has gone are dropped by themselves.

Keys are shown as on the Mac: ⌘ Command, ⌥ Option, ⌃ Control, ⇧ Shift. Studio for Windows shows its own keys beside each menu item.