animationState: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\| arma1 \|1.00 \|([^g]|g[^a])" to "| arma1 |1.00 |game2= arma2 |version2= 1.00 |game3= arma2oa |version3= 1.50 |game4= tkoh |version4= 1.00 |game5= arma3 |version5= 0.50 |$1") |
No edit summary |
||
(22 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=command | {{RV|type=command | ||
| arma1 | |game1= arma1 | ||
|1.00 | |version1= 1.00 | ||
|game2= arma2 | |game2= arma2 | ||
Line 20: | Line 20: | ||
|gr1= Animations | |gr1= Animations | ||
| Returns the name of a unit's current primary animation. Seems to be forced to lower case in | |descr= Returns the name of a unit's current primary animation. Seems to be forced to lower case in {{arma3}}. | ||
{{Feature| | {{Feature|informative|This command is only for a man unit, other units such as animals cannot use this command.}} | ||
| | |s1= [[animationState]] unitName | ||
|p1= unitName: [[Object]] | |p1= unitName: [[Object]] | ||
Line 29: | Line 29: | ||
|r1= [[String]] | |r1= [[String]] | ||
|x1= < | |x1= <sqf>_state = animationState player;</sqf> | ||
|mp= 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. | |mp= 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. | ||
|seealso= [[switchMove]] | |||
|seealso= [[gestureState]] [[switchMove]] [[playMove]] [[pose]] [[BIS_fnc_ambientAnimGetParams]] [[getUnitMovesInfo]] | |||
}} | }} | ||
Line 37: | Line 39: | ||
<dt></dt> | <dt></dt> | ||
<dd class="notedate">Posted on | <dd class="notedate">Posted on 2019-08-13 - 07:44 (UTC)</dd> | ||
<dt class="note">[[User:POLPOX|POLPOX]]</dt> | <dt class="note">[[User:POLPOX|POLPOX]]</dt> | ||
<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: | ||
< | <sqf>configName (configFile >> getText (configFile >> "CfgVehicles" >> typeOf _unit >> "moves") >> "States" >> (animationState _unit)) // e.g. "AmovPercMstpSrasWrflDnon"</sqf> | ||
Opposite to regular animationState return value: | Opposite to regular animationState return value: | ||
< | <sqf>animationState _unit // e.g. "amovpercmstpsraswrfldnon"</sqf> | ||
</dd> | </dd> | ||
</dl> | </dl> |
Latest revision as of 12:36, 26 February 2024
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:
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 2019-08-13 - 07:44 (UTC)
- POLPOX
-
In case you need to get the animation name including upper cases:
Opposite to regular animationState return value:configName (configFile >> getText (configFile >> "CfgVehicles" >> typeOf _unit >> "moves") >> "States" >> (animationState _unit)) // e.g. "AmovPercMstpSrasWrflDnon"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