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.
Syntax
getAnimationsQueue entity
Parameters:
entity: Object - Man or animal object.
Returns: Array - in format [primaryQueue, secondaryQueue] where each queue is an Array of Strings, the animation state names (all lower case).
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; // push an animation state to the secondary queue
player playAction "WalkF"; // an action that gets mapped to an animation state and pushed to queue
getAnimationsQueue player params ["_primaryQueue", "_secondaryQueue"];
// _secondaryQueue will contain _myMove and the animation that the "WalkF" action maps to