doFSM: Difference between revisions
Jump to navigation
Jump to search
Groups:
Uncategorised
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Orders a unit to process command defined by [[FSM]] file (silently). |= Description | | Orders a unit to process command defined by [[FSM]] file (silently). | ||
Unlike with execFSM where ''_this'' is passed to the FSM, the following parameters are passed when using doFSM/commandFSM: | |||
; _leader: leader of subgroup with this command | |||
; _destination: command destination/position | |||
; _target: command target | |||
; _units: list of all persons in subgroup | |||
|= Description | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 34: | Line 43: | ||
<dd class="notedate">Posted on August 23, 2007 - 08:36</dd> | <dd class="notedate">Posted on August 23, 2007 - 08:36</dd> | ||
<dt class="note">'''[[User:Str|Str]]'''</dt><dd class="note">Values passed to FSM file are '''_units''', '''_destination''' and '''_target'''</dd> | <dt class="note">'''[[User:Str|Str]]'''</dt><dd class="note">Values passed to FSM file are '''_units''', '''_destination''' and '''_target'''</dd> | ||
<!-- Note Section END --> | |||
</dl> | |||
<dl class="command_description"> | |||
<!-- Note Section BEGIN --> | |||
<dd class="notedate">Posted on August 4, 2010 - 16:09</dd> | |||
<dt class="note">'''[[User:Rübe|Rübe]]'''</dt><dd class="note">Do not `doStop` a unit in a FSM called with doFSM. Doing so nevertheless will halt your FSM, since no links are followed anymore (doing so in an end state should be fine though). Also this may crash your game in certain mysterious circumstances.</dd> | |||
<!-- Note Section END --> | <!-- Note Section END --> | ||
</dl> | </dl> |
Revision as of 15:17, 4 August 2010
Description
- Description:
- Orders a unit to process command defined by FSM file (silently).
Unlike with execFSM where _this is passed to the FSM, the following parameters are passed when using doFSM/commandFSM:
- _leader
- leader of subgroup with this command
- _destination
- command destination/position
- _target
- command target
- _units
- list of all persons in subgroup
Syntax
- Syntax:
- unit(s) doFSM [fsmName, position, target]
- Parameters:
- unit(s): Object or Array
- [fsmName, position, target]: Array
- fsmName: String
- position: (Array)
- target: Object
- Return Value:
- Nothing
Examples
- Example 1:
_soldierOne doFSM ["move.fsm", position player, player]
Additional Information
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
Notes
- Posted on August 23, 2007 - 08:36
- Str
- Values passed to FSM file are _units, _destination and _target
- Posted on August 4, 2010 - 16:09
- Rübe
- Do not `doStop` a unit in a FSM called with doFSM. Doing so nevertheless will halt your FSM, since no links are followed anymore (doing so in an end state should be fine though). Also this may crash your game in certain mysterious circumstances.