execFSM: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " " to " ") |
Lou Montana (talk | contribs) m (Text replacement - "\{\{( *)Important( *)\|" to "{{$1Feature$2|$2important$2|") |
||
Line 14: | Line 14: | ||
Scripted FSMs are added into the scheduler just like [[exec]] scripts, [[execVM]] scripts and [[spawn]] scripts.<br> | Scripted FSMs are added into the scheduler just like [[exec]] scripts, [[execVM]] scripts and [[spawn]] scripts.<br> | ||
To see what FSMs are currently in the scheduler, use [[diag_activeMissionFSMs]] command. | To see what FSMs are currently in the scheduler, use [[diag_activeMissionFSMs]] command. | ||
{{ | {{Feature|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.}} | 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.}} | ||
Revision as of 02:12, 7 February 2021
Description
- Description:
- Description needed
- Groups:
- Program Flow
Syntax
- Syntax:
- Syntax needed
- Parameters:
- arguments: Anything - Arguments accessible as _this in the FSM
- fsmFilePath: String - file with FSM code
- Return Value:
- Return value needed
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:
- See also needed
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