Anim_YDir

Category: Animations
Since engine version: 1.0 OC

Description

The value is proportional to the object's velocity in Y direction. The velocities 0 to max_dir are mapped linearly to the interval given by begin and end.

Syntax

array Anim_YDir(int begin, int end, int max_dir);

Parameters

begin:
Start of the interval.
end:
End of the interval. If end is greater than begin then the value increases with increases XDir, otherwise it decreases.
max_dir:
Highest value of the YDir to be mapped. All larger velocities lead to the same animation value (end).

Remark

See the animation documentation for further explanations of the animation system.

Example

PlayAnimation("ShowSpeed", 10, Anim_YDir(0, GetAnimationLength("ShowSpeed"), 100), Anim_Const(1000));
Plays the animation "ShowSpeed" in slot 10. This could be a velocity display in an elevator.
See also: Anim_AbsX, Anim_AbsY, Anim_Action, Anim_Const, Anim_Dist, Anim_Linear, Anim_R, Anim_X, Anim_XDir, Anim_Y, PlayAnimation, SetAnimationPosition, SetAnimationWeight
Clonk-Karl, 2010-01