Creator · Visual Scripting
Visual Scripting Functions
Functions are reusable same-script graph scopes with typed inputs and outputs. Use them to keep large graphs readable and to share behavior inside one script.
engine v1.0.234Copy for LLM
Authoring
- Create functions in the Functions panel.
- Add Function Input and Function Output nodes inside the function graph.
- Call the function from handlers or other function scopes with a Function Call node.
- Keep function call graphs acyclic; recursive functions are rejected.
Exporting
The export toggle makes a function callable from the external runtime SDK. Only export functions that are intended as part of the script's public runtime contract.
Internal function calls remain synchronous inside the generated TypeScript. External calls are asynchronous because they travel through Runtime command dispatch.
await runtime.invokeScriptFunction(gameId, roomId, entityId, scriptId, "heal", [25], {
playerSessionId,
clientSeq
});
Non-exported functions are not exposed through generated SDK function accessors, and Runtime rejects direct command attempts to call them.