{"name":"getAnimationsQueue","title":"getAnimationsQueue","type":"command","url":"https://community.bistudio.com/wiki/getAnimationsQueue","revid":378279,"updated":"2026-03-31T10:03:56Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","locality":{"argument":"global"},"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","params":[{"name":"entity","type":"Object","description":"Man or animal object.","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"in format [primaryQueue, secondaryQueue] where each queue is an Array of Strings, the animation state names (all lower case)."},"form":"unary","right":{"text":"entity"}}],"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};"]},{"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"]}],"see_also":["animationState","getUnitMovesInfo"]}