Difference between revisions of "execFSM"

From Bohemia Interactive Community
Jump to navigation Jump to search
(see also)
(formatting syntax/example, added examples)
Line 8: Line 8:
  
 
| Execute the scripted FSM. The FSM file is first searched in the mission folder, then in the campaign scripts folder and finally in the global scripts folder.  
 
| Execute the scripted FSM. The FSM file is first searched in the mission folder, then in the campaign scripts folder and finally in the global scripts folder.  
Returns the FSM handler or 0 when failed. |= Description
+
<br>Argument(s) (if any) is/are passed as <tt>_this</tt> to the FSM.
 +
<br>Returns the FSM handle or 0 when failed. |= Description
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| [[Number]] <nowiki>=</nowiki> argument '''execFSM''' filename |= Syntax
+
| argument(s) '''execFSM''' filename |= Syntax
  
|p1= argument: [[Any Value]](s) |= Parameter 1
+
|p1= argument(s): [[Any Value]](s) - Optional. Argument(s) accessible as <tt>_this</tt> in the FSM|= Parameter 1
  
 
|p2= filename: [[String]] |= Parameter 2
 
|p2= filename: [[String]] |= Parameter 2
  
| [[Number]] |= Return value
+
| [[Number]] - FSM handle |= Return value
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
|x1= <pre>_id = player execFSM "test.fsm";</pre>|= EXAMPLE1  
+
|x1= <code>_id = [[player]] [[execFSM]] "test.fsm";</code>|= EXAMPLE1  
 +
 
 +
|x2= <code>_handle = [_a, _b, _c] [[execFSM]] "test.fsm";</code>|= EXAMPLE2
 +
 
 +
|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  
  
 
|  |= MPBEHAVIOUR  
 
|  |= MPBEHAVIOUR  

Revision as of 02:27, 23 March 2014

Introduced with Arma 2 version 1.00
  

Click on the images for descriptions

Introduced in

Game:
Arma 2
Version:
1.00

Description

Description:
Execute the scripted FSM. The FSM file is first searched in the mission folder, then in the campaign scripts folder and finally in the global scripts folder.
Argument(s) (if any) is/are passed as _this to the FSM.
Returns the FSM handle or 0 when failed.

Syntax

Syntax:
argument(s) execFSM filename
Parameters:
argument(s): Any Value(s) - Optional. Argument(s) accessible as _this in the FSM
filename: String
Return Value:
Number - FSM handle

Examples

Example 1:
_id = player execFSM "test.fsm";
Example 2:
_handle = [_a, _b, _c] execFSM "test.fsm";
Example 3:
_handle = execFSM "test.fsm";

Additional Information

Multiplayer:
-
See also:
FSMFSM Editor ManualexecVMcallspawnexeccommandFSMcompletedFSMdoFSMgetFSMVariablesetFSMVariable

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Bottom Section