User Tools

Site Tools


execute_script

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
execute_script [2019/10/28 12:19]
justin
execute_script [2020/03/26 09:39]
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:​====
-<​code ​python+<​code ​bauxite
-execute_script("​move_cat"​)+execute_script("​move_cat"​, false)
 </​code>​ </​code>​
-//​Results://​ The script named "​move_cat"​ is triggered and runs in parallel ​to the currently running script.+//​Results://​ The script named "​move_cat"​ is triggered and runs in parallel ​with the currently running 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.
 </​WRAP>​ </​WRAP>​
  
execute_script.txt · Last modified: 2020/03/26 09:39 by justin