{"name":"getAnimationsQueue","operator":null,"title":"getAnimationsQueue","type":"command","url":"https://community.bistudio.com/wiki/getAnimationsQueue","revid":378279,"updated":"2026-03-31T10:03:56Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"2.22"}],"since":{"game":"arma3","name":"Arma 3","version":"2.22"},"arma3_since":"2.22","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"Returns the primary and secondary animations queue of the entity. The primary queue contains the full motion path from current animation (animationState) to a target animation, while the secondary queue contains animations that are queued to be played after the target animation in primaryQueue is reached, e.g. due to using playMove or playAction.","syntaxes":[{"syntax":"getAnimationsQueue entity","since":null,"effect":null,"exec":null,"params":[{"name":"entity","type":"Object","optional":false,"default":null,"description":"Man or animal object.","types":["Object"],"since":null,"text":"entity: Object - Man or animal object."}],"returns":{"type":"Array","types":["Array"],"description":"in format [primaryQueue, secondaryQueue] where each queue is an Array of Strings, the animation state names (all lower case).","text":"Array - in format [primaryQueue, secondaryQueue] where each queue is an Array of Strings, the animation state names (all lower case)."},"form":"unary","operator":null,"left":null,"right":{"text":"entity","types":["Object"]}}],"examples":[{"text":"```sqf\ngetAnimationsQueue player params [\"_primaryQueue\", \"_secondaryQueue\"];\nif (_secondaryQueue isNotEqualTo []) then { \n    private _targetAnim = _primaryQueue param [count _primaryQueue - 1, animationState player];\n    private _nextAnim = _secondaryQueue#0;\n    systemChat format [\"Will play '%1' after completing '%2'\", _nextAnim, _targetAnim]; \n};\n```","code":["getAnimationsQueue player params [\"_primaryQueue\", \"_secondaryQueue\"];\nif (_secondaryQueue isNotEqualTo []) then { \n    private _targetAnim = _primaryQueue param [count _primaryQueue - 1, animationState player];\n    private _nextAnim = _secondaryQueue#0;\n    systemChat format [\"Will play '%1' after completing '%2'\", _nextAnim, _targetAnim]; \n};"]},{"text":"```sqf\nplayer playMove _myMove; // push an animation state to the secondary queue\nplayer playAction \"WalkF\"; // an action that gets mapped to an animation state and pushed to queue\ngetAnimationsQueue player params [\"_primaryQueue\", \"_secondaryQueue\"];\n// _secondaryQueue will contain _myMove and the animation that the \"WalkF\" action maps to\n```","code":["player playMove _myMove; // push an animation state to the secondary queue\nplayer playAction \"WalkF\"; // an action that gets mapped to an animation state and pushed to queue\ngetAnimationsQueue player params [\"_primaryQueue\", \"_secondaryQueue\"];\n// _secondaryQueue will contain _myMove and the animation that the \"WalkF\" action maps to"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["animationState","getUnitMovesInfo"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Manipulation","Introduced with Arma 3 version 2.22","Scripting Commands"]}