getUnitMovesInfo: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Example) |
||
Line 19: | Line 19: | ||
* 2 - [[Scalar]] - move duration | * 2 - [[Scalar]] - move duration | ||
* 3 - [[Scalar]] - move blend factor | * 3 - [[Scalar]] - move blend factor | ||
* 4 - [[Vector3D]] - | * 4 - [[Vector3D]] - rtm step (how many meters the unit moves after finishing the move) | ||
* 5 - [[Scalar]] - gesture progress in range 0-1 | * 5 - [[Scalar]] - gesture progress in range 0-1 | ||
* 6 - [[Scalar]] - gesture elapsed time ({{hl|gesture progress * gesture duration}}) | * 6 - [[Scalar]] - gesture elapsed time ({{hl|gesture progress * gesture duration}}) | ||
Line 31: | Line 31: | ||
|r2= [[Anything]] - Value of the requested property, or [[Nothing]] if index is invalid. See the main syntax. | |r2= [[Anything]] - Value of the requested property, or [[Nothing]] if index is invalid. See the main syntax. | ||
|x1= <sqf>_animInfo = getUnitMovesInfo player; | |||
// velocity = displacement / time | |||
_animVelocity = _animInfo#4 vectorMultiply -1 / _animInfo#2; // -1 is because man model is reversed, so rtm animation moves "backwards" | |||
</sqf> | |||
|seealso= [[switchMove]] [[switchGesture]] [[moveTime]] [[gestureState]] [[animationState]] | |seealso= [[switchMove]] [[switchGesture]] [[moveTime]] [[gestureState]] [[animationState]] | ||
}} | }} |
Revision as of 12:43, 26 February 2024
Description
- Description:
- Returns various information about the unit moves (primary animation) and gestures (masked animation)
- Groups:
- Animations
Syntax
- Syntax:
- getUnitMovesInfo unit
- Parameters:
- unit: Object
- Return Value:
- Array in format:
- 0 - Scalar - move progress in range 0-1
- 1 - Scalar - move elapsed time (move progress * move duration)
- 2 - Scalar - move duration
- 3 - Scalar - move blend factor
- 4 - Vector3D - rtm step (how many meters the unit moves after finishing the move)
- 5 - Scalar - gesture progress in range 0-1
- 6 - Scalar - gesture elapsed time (gesture progress * gesture duration)
- 7 - Scalar - gesture duration
- 8 - Scalar - gesture blend factor
Alternative Syntax
- Syntax:
- unit getUnitMovesInfo index
- Parameters:
- unit: Object
- index: Number - index of property from the main syntax
- Return Value:
- Anything - Value of the requested property, or Nothing if index is invalid. See the main syntax.
Examples
- Example 1:
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note