Executes the specified script. The script will run in parallel with the current one (unless specified otherwise).
execute_script(script_name)
Argument | Description | Type | Required |
---|---|---|---|
script_name | Name of the script (as defined in the Script Editor). | String | Yes |
pause | Whether or not the current script should be paused until the triggered script has finished executing. Defaults to false. | Boolean | No |
execute_script("move_cat", false);
Results: The script named “move_cat” is triggered and runs in parallel with the currently running script.
Use the Execute Script function to trigger scripted movements for an NPC or the camera without holding up the main script of a cutscene, or to encapsulate reusable functionality within a separate script.