getAnimationsQueue: Difference between revisions

From Bohemia Interactive Community
(Created page with "{{RV|type=command |game1= arma3 |version1= 2.22 |arg= global |gr1= Object Manipulation |descr= 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. |s1= getAnim...")
 
No edit summary
Line 22: Line 22:
     systemChat format ["Will play '%1' after completing '%2'", _nextAnim, _targetAnim];  
     systemChat format ["Will play '%1' after completing '%2'", _nextAnim, _targetAnim];  
};
};
</sqf>
|x2= <sqf>player playMove _myMove;
player playAction "WalkF";
getAnimationsQueue player params ["_primaryQueue", "_secondaryQueue"];
// _secondaryQueue will contain _myMove and the animation that the "WalkF" action maps to
</sqf>
</sqf>


|seealso= [[animationState]] [[getUnitMovesInfo]]
|seealso= [[animationState]] [[getUnitMovesInfo]]
}}
}}

Revision as of 12:00, 31 March 2026

Hover & click on the images for description

Description

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.
Groups:
Object Manipulation

Syntax

Syntax:
getAnimationsQueue entity
Parameters:
entity: Object - Man or animal object.
Return Value:
Array - in format [primaryQueue, secondaryQueue] where each queue is an Array of Strings.

Examples

Example 1:
getAnimationsQueue player params ["_primaryQueue", "_secondaryQueue"]; if (_secondaryQueue isNotEqualTo []) then { private _targetAnim = _primaryQueue param [count _primaryQueue - 1, animationState player]; private _nextAnim = _secondaryQueue#0; systemChat format ["Will play '%1' after completing '%2'", _nextAnim, _targetAnim]; };
Example 2:
player playMove _myMove; player playAction "WalkF"; getAnimationsQueue player params ["_primaryQueue", "_secondaryQueue"]; // _secondaryQueue will contain _myMove and the animation that the "WalkF" action maps to

Additional Information

See also:
animationState getUnitMovesInfo

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note