execFSM: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Arma[ _]3(\|.*)]]" to "{{GameCategory|arma3|Scripting Commands}}") |
Lou Montana (talk | contribs) m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Arma[ _]2(\|.*)\]\]" to "{{GameCategory|arma2|Scripting Commands}}") |
||
Line 55: | Line 55: | ||
<h3 style='display:none'>Bottom Section</h3> | <h3 style='display:none'>Bottom Section</h3> | ||
{{GameCategory|arma2|Scripting Commands}} | |||
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]] | ||
{{GameCategory|arma3|Scripting Commands}} | {{GameCategory|arma3|Scripting Commands}} | ||
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] |
Revision as of 17:20, 8 January 2021
Description
- Description:
- 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 _this variable inside FSM. Variables set inside FSMs can be read/modified externally, using setFSMVariable and getFSMVariable commands.
The return value is the FSM handle; it can be used to determine (via completedFSM) when the FSM has finished.
Scripted FSMs are added into the scheduler just like exec scripts, execVM scripts and spawn scripts.
To see what FSMs are currently in the scheduler, use diag_activeMissionFSMs command. - Groups:
- Program Flow
Syntax
- Syntax:
- arguments execFSM fsmFilePath
- Parameters:
- arguments: Anything - Arguments accessible as _this in the FSM
- fsmFilePath: String - file with FSM code
- Return Value:
- Number - FSM handle
Alternative Syntax
- Syntax:
- execFSM fsmFilePath
- Parameters:
- fsmFilePath: String - file with FSM code
- 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
- See also:
- FSMFSM Editor ManualexecVMcallspawnexeccommandFSMcompletedFSMdoFSMgetFSMVariablesetFSMVariable
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note