call_script_function()
Call Script Function | Action ID: CallScriptFunction
Call a function published through Functions as Nodes, pass named parameters, and optionally store its return value.
| Option key / field | Meaning and accepted 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.
let options = {}
options["functionKey"] = "pcaScripts/rewards_pca/award"
options["parameters"] = {"points": 5, "message": "Well done."}
options["resultVariable"] = ""
call_script_function(options)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.
