Difference between revisions of "execFSM"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Take[ _]On[ _]Helicopters(\|.*)?\]\]" to "{{GameCategory|tkoh|Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
 
{{Command|Comments=
 
{{Command|Comments=
____________________________________________________________________________________________
 
  
 
| arma2 |Game name=
 
| arma2 |Game name=
Line 8: Line 7:
  
 
|gr1= Program Flow |GROUP1=
 
|gr1= Program Flow |GROUP1=
____________________________________________________________________________________________
 
  
 
| Execute scripted [[FSM]] and return the FSM handle or 0 when failed. The FSM file is first searched in the mission folder, then in the campaign scripts folder and finally in the global scripts folder. Argument (if any) are available in <tt>_this</tt> variable inside FSM. Variables set inside FSMs can be read/modified externally, using [[setFSMVariable]] and [[getFSMVariable]] commands.<br>
 
| Execute scripted [[FSM]] and return the FSM handle or 0 when failed. The FSM file is first searched in the mission folder, then in the campaign scripts folder and finally in the global scripts folder. Argument (if any) are available in <tt>_this</tt> variable inside FSM. Variables set inside FSMs can be read/modified externally, using [[setFSMVariable]] and [[getFSMVariable]] commands.<br>
Line 19: Line 17:
 
{{Important|While the code placed into any of the sections of FSM cannot be suspended ([[canSuspend]] is false), the FSM itself is suspended every simulation between the state's <tt>init</tt> and <tt>precondition</tt> (exception is the '''init state'''). This is the only place where scripted FSM is suspended/resumed.
 
{{Important|While the code placed into any of the sections of FSM cannot be suspended ([[canSuspend]] is false), the FSM itself is suspended every simulation between the state's <tt>init</tt> and <tt>precondition</tt> (exception is the '''init state'''). This is the only place where scripted FSM is suspended/resumed.
 
The usual difference between the state's <tt>init</tt> and <tt>precondition</tt> is 1 frame but if the scheduler is busy it can take longer. See [[FSM]] for more information about FSM's structure.}} |Description=
 
The usual difference between the state's <tt>init</tt> and <tt>precondition</tt> is 1 frame but if the scheduler is busy it can take longer. See [[FSM]] for more information about FSM's structure.}} |Description=
____________________________________________________________________________________________
 
  
 
| arguments [[execFSM]] fsmFilePath |Syntax=
 
| arguments [[execFSM]] fsmFilePath |Syntax=
Line 34: Line 31:
  
 
| r2= [[Number]] - FSM handle |Return value 2=
 
| r2= [[Number]] - FSM handle |Return value 2=
____________________________________________________________________________________________
 
  
 
|x1= <code>_id = [[player]] [[execFSM]] "test.fsm";</code> |EXAMPLE1=
 
|x1= <code>_id = [[player]] [[execFSM]] "test.fsm";</code> |EXAMPLE1=
Line 41: Line 37:
  
 
|x3= <code>_handle = [[execFSM]] "test.fsm";</code> |EXAMPLE3=
 
|x3= <code>_handle = [[execFSM]] "test.fsm";</code> |EXAMPLE3=
____________________________________________________________________________________________
 
  
 
| [[FSM]], [[FSM Editor Manual]], [[execVM]], [[call]], [[spawn]], [[exec]], [[commandFSM]], [[completedFSM]], [[doFSM]], [[getFSMVariable]], [[setFSMVariable]] |SEEALSO=
 
| [[FSM]], [[FSM Editor Manual]], [[execVM]], [[call]], [[spawn]], [[exec]], [[commandFSM]], [[completedFSM]], [[doFSM]], [[getFSMVariable]], [[setFSMVariable]] |SEEALSO=

Revision as of 02:14, 17 January 2021

Template:Command

Notes

Bottom Section