Signals are custom stage-wide events. Define the signal in the editor signal manager before using it; injection fails when a generated graph references a signal that does not exist in the map.
String-based usage is still supported. It is useful for no-parameter signals or code that does not need type hints:
The global helper can also send a signal:
When inject is configured, the compiler extracts signal definitions from the map into src/resources/signals.ts. Import Signal from that file to get typed parameters for both sendSignal and onSignal.
Signal.xxx carries the signal name, parameter names, and parameter types. TypeScript checks the argument count and types when sending, and evt.params.<paramName> exposes typed parameters when listening.
Signal parameters can mix literal values and wired node outputs:
In this example, the first parameter is a node output and the other two are literals. The compiler writes all of them to the corresponding parameter pins on the same send-signal node.
f.sendSignal and send only reach node graphs; client Lua scripts never receive them. To reach Lua, use the Send Client Scripted Server Signal node added in 7.2:
sendLua(player, signal, ...params) sends to one player, and every client Lua script mounted on that player receives it. You can also write player.sendLua(signal, ...params) or f.sendClientScriptedServerSignal(...).sendLuaAll(signal, ...params) loops over Get List of Player Entities on the Field and sends to each player.player(index) or an element of the on-field player list. The Signal Source Entity of a signal sent from Lua cannot be used as the target (nothing arrives); to reply to the sender, have the client include something that identifies it in the parameters.lua.onSignal; see Client Lua: signals and subscriptions.Signal.xxx comes from the extracted map data; after editing signals in the editor, save the map first, then rerun compilation to extract the updated signal information.