Category: Animations
Since engine version: 1.0 OC
Anim_XDir
Description
The value is proportional to the object's velocity in X direction. The velocities from 0 to max_dir are mapped linearily to the interval from begin to end.
Syntax
array Anim_XDir(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:
- Largest value of XDir to be mapped. Even 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_XDir(0, GetAnimationLength("ShowSpeed"), 100), Anim_Const(1000));
Plays the animation "ShowSpeed" in slot 10. This could be a tachoometer in a vehicle.