scene_add_signal
Creates a named level-wide broadcast signal in a copied save for one graph to notify many entity graphs and client Lua scripts, carrying optional string or typed payloads.
Instructions
Define a signal (信号) in a copy of a save: a level-wide broadcast with a name. One graph sends it with f.sendSignal('name') and any number of graphs on any entities hear it with .onSignal('name', (evt, f) => {...}). It is the platform's way to let one thing tell many without knowing them: night falls and the lamps, the gates and the enemies each react in their own graph. parameter gives the signal one string to carry (its name; the sender passes the string as second argument of f.sendSignal, the listeners read it from the event): which lever, which team. parameters gives it several values of any of the eighteen types the editor offers, [{name, type}] with type one of integer, float, boolean, string, vector3, entity, guid, prefabId, configId or a list of one of them (integerList ...): a score as an integer, where something happened as a vector3, who did it as an entity. The answer says how graphs and client scripts send and read them (defineSignal in a graph, AddInt and the like in Lua). The same signal reaches the client scripts (Lua) of one player when a graph sends it as f.sendSignal('client:name', player) (and the string after the player when it carries one): that is the node 发送客户端脚本信号 of game 7.1, which the compiler does not know and this server puts in when it writes the graph; a script hears it with script:RegisterServerSignalHandler("name", function(name, params) ... end). A name cannot begin with "client:". Writes a new .gil in the workspace; the official save is not touched. Verified in play on 2026-10-10, without and with a parameter; to client scripts on 2026-10-13 (example clientsignal).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| mapPath | No | ||
| parameter | No | ||
| outputName | No | ||
| parameters | No |