{"name":"animationState","title":"animationState","type":"command","url":"https://community.bistudio.com/wiki/animationState","revid":379238,"updated":"2026-10-30T23:15:53Z","groups":["Animations"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the name of a unit's current primary animation. Seems to be forced to lower case in Arma 3.\n\n> [!NOTE]\n> Up until Arma 3 v2.20 this command only worked for a man unit, and other units such as animals couldn't use this command. As of Arma 3 v2.22 animals are supported as well.","syntaxes":[{"syntax":"animationState unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"code":["_state = animationState player;"]}],"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.","see_also":["gestureState","switchMove","playMove","pose","BIS_fnc_ambientAnimGetParams","getUnitMovesInfo"],"notes":[{"user":"POLPOX","date":"2019-08-13T07:44:00Z","text":"In case you need to get the animation name including upper cases:\n\n```sqf\nconfigName (configFile >> getText (configFile >> \"CfgVehicles\" >> typeOf _unit >> \"moves\") >> \"States\" >> (animationState _unit)) // e.g. \"AmovPercMstpSrasWrflDnon\"\n```\n\nOpposite to regular animationState return value:\n\n```sqf\nanimationState _unit // e.g. \"amovpercmstpsraswrfldnon\"\n```"}]}