CallScriptFunction()
Call Script Function
Call a function published through Functions as Nodes, pass named parameters, and optionally store its return value.
| Option key / field | Meaning and input | Default |
|---|---|---|
| Function functionKey | Text/reference. | Blank |
| Parameters parameters | A typed value or valid JSON. | {} |
| Result Variable resultVariable | Name of the game variable that receives the returned value. | Blank |
Timing. Waits for the published function call.
await CallScriptFunction({
"functionKey": "scripts/reward_gd/award",
"parameters": {"points": 5, "message": "Well done."},
"resultVariable": ""
})In use. Publish a reward function with points and message parameters. Choose it here, enter those parameters, and store the result in reward_ok. The function must be defined and published first; this action does not infer a function from an arbitrary name.
