animationState: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>") |
Lou Montana (talk | contribs) m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>") |
||
Line 43: | Line 43: | ||
<dd class="note"> | <dd class="note"> | ||
In case you need to get the animation name including upper cases: | In case you need to get the animation name including upper cases: | ||
<code>configName (configFile >> getText (configFile >> "CfgVehicles" >> | <code>configName (configFile >> getText (configFile >> "CfgVehicles" >> typeOf _unit >> "moves") >> "States" >> ([[animationState]] _unit)) {{cc|e.g. "AmovPercMstpSrasWrflDnon"}}</code> | ||
Opposite to regular animationState return value: | Opposite to regular animationState return value: | ||
<code>animationState _unit {{cc|e.g. "amovpercmstpsraswrfldnon"}}</code> | <code>animationState _unit {{cc|e.g. "amovpercmstpsraswrfldnon"}}</code> |
Revision as of 11:09, 12 May 2022
Description
- Description:
- Returns the name of a unit's current primary animation. Seems to be forced to lower case in Arma 3.
- Multiplayer:
- When executed on a client, this command only returns accurate results when the target unit is within sight of the client. When executed on a dedicated server, the returned value is accurate.
- Groups:
- Animations
Syntax
- Syntax:
- animationState unitName
- Parameters:
- unitName: Object
- Return Value:
- String
Examples
- Example 1:
_state = animationState 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
- Posted on August 13, 2019 - 07:44 (UTC)
- POLPOX
-
In case you need to get the animation name including upper cases:
configName (configFile >> getText (configFile >> "CfgVehicles" >> typeOf _unit >> "moves") >> "States" >> (animationState _unit)) // e.g. "AmovPercMstpSrasWrflDnon"
Opposite to regular animationState return value:animationState _unit // e.g. "amovpercmstpsraswrfldnon"
Categories:
- Scripting Commands
- Introduced with Armed Assault version 1.00
- ArmA: Armed Assault: New Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Animations