animationState: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("serv...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma1 |Game name=
| arma1


|1.00|Game version=
|1.00


|arg= global |Multiplayer Arguments=
|arg= global |Multiplayer Arguments=


|gr1= Animations |GROUP1=
|gr1= Animations


| Returns the name of a unit's current primary animation. Seems to be forced to lower case in Arma 3.<br>
| Returns the name of a unit's current primary animation. Seems to be forced to lower case in Arma 3.<br>
{{Informative|This command is only for a man unit, other units such as animals cannot use this command.}} |DESCRIPTION=
{{Informative|This command is only for a man unit, other units such as animals cannot use this command.}}


| '''animationState''' unitName |SYNTAX=
| '''animationState''' unitName


|p1= unitName: [[Object]] |PARAMETER1=
|p1= unitName: [[Object]]


| [[String]] |RETURNVALUE=
| [[String]]


|x1= <code>_state = [[animationState]] [[player]];</code> |EXAMPLE1=
|x1= <code>_state = [[animationState]] [[player]];</code>
| 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. |= Multiplayer
| 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. |= Multiplayer


| [[switchMove]], [[playMove]], [[BIS_fnc_ambientAnimGetParams]] |SEEALSO=
| [[switchMove]], [[playMove]], [[BIS_fnc_ambientAnimGetParams]]


}}
}}

Revision as of 00:02, 18 January 2021

Hover & click on the images for description

Description

Description:
Returns the name of a unit's current primary animation. Seems to be forced to lower case in Arma 3.
This command is only for a man unit, other units such as animals cannot use this command.
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

See also:
switchMoveplayMoveBIS_fnc_ambientAnimGetParams

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 22, 2014 - 23:30
ffur2007slx2_5
(A3 1.26) To sort animation state by keyword, use BIS_fnc_ambientAnimGetParams ("KNEEL" call BIS_fnc_ambientAnimGetParams) select 0; //return: ["amovpknlmstpslowwrfldnon"…] Useful keywords are: "STAND", "WATCH", "GUARD", "LISTEN_BRIEFING", "LEAN_ON_TABLE", "LEAN", "SIT_AT_TABLE", "KNEEL", "PRONE_INJURED", "BRIEFING" ect.

Bottom Section

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"