Arma 3 Scripting

getUnitMovesInfo

  • Global argument
  • Arma 3 v2.18

Command · Markdown · JSON · original wiki page

Description

Returns various information about the unit moves (primary animation) and gestures (masked animation)

Note

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.

Syntax

Syntax 1

getUnitMovesInfo unit

Parameters:

Returns: Array format:

Syntax 2

unit getUnitMovesInfo index

Parameters:

Returns: Anything - Value of the requested property, or Nothing if index is invalid. See the main syntax.

Examples

Example 1

// Getting the move velocity of the animation
private _animInfo = getUnitMovesInfo player;
// velocity = displacement / time
private _animVelocity = _animInfo # 4 vectorMultiply -1 / _animInfo # 2;    // -1 is because man model is reversed
                                                                            // so the rtm animation moves "backwards"

Example 2

getUnitMovesInfo player params [
    "_moveProgress",
    "_moveTime",
    "_moveDuration",
    "_moveFactor",
    "_rtmStep",
    "_gestureProgress",
    "_gestureTime",
    "_gestureDuration",
    "_gestureFactor"
];

See also

switchMove · switchGesture · moveTime · gestureState · animationState