This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
execute_script [2020/02/04 19:59] – justin | execute_script [2021/04/21 18:29] (current) – justin | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- | ---- | ||
- | Executes the specified script. The script will run in parallel with the current one. | + | Executes the specified script. The script will run in parallel with the current one (unless specified otherwise). |
====Signature: | ====Signature: | ||
Line 11: | Line 11: | ||
^Argument^Description^Type^Required^ | ^Argument^Description^Type^Required^ | ||
|script_name|Name of the script (as defined in the [[Script Editor]]).|[[String]]|Yes| | |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| | ||
====Example: | ====Example: | ||
- | < | + | < |
- | execute_script(" | + | execute_script(" |
</ | </ | ||
// | // | ||
<WRAP center round tip 100%> | <WRAP center round tip 100%> | ||
- | Use the **Execute Script** function to trigger scripted movements for an NPC or the camera without holding up the main script of a cutscene. | + | 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. |
</ | </ | ||