# Anim_Y

Animations
5.1 OC
array
int position Start value. Should be inside the interval given by begin and end.
int begin Start of the interval.
int end End of the interval. If end is greater than begin then the value increases with movement into positive Y direction, otherwise it decreases in that case.
int length Number of pixels that need to be moved in Y direction for the animation to be played from begin to end.
The value depends on the movement of the object in Y direction. Each pixel the object moves into positive Y direction increases the value a little bit, and each pixel in negative Y direction decreases it. If end is reached then the value is reset to begin, and if begin is reached then the value is reset to end.
See the animation documentation for further explanations of the animation system.
PlayAnimation
("Scale", 5, Anim_Y(0, GetAnimationLength("Scale"), 0, 15), Anim_Const(1000));
Plays the animation "Scale" in slot 5, superimposing any other potential animations in slot 5. The animation is being played the faster the faster the object moves into Y direction. After the object moved 15 pixels the animation has been played form start to end and restarts from the beginning. Here we use Anim_Y instead of Anim_AbsY so that the animation is played in the opposite direction if scaling downwards. begin was chosen to be greater than end so that the animation is played forwards for movement in negative Y direction (climbing upwards) and so that it is played backwards for movement in positive Y direction (climbing downwards).
PlayAnimation
SetAnimationPosition
SetAnimationWeight
Anim_Const
Anim_Linear
Anim_X
Anim_R
Anim_AbsX
Anim_AbsY
Anim_XDir
Anim_YDir
Anim_Action
Clonk-Karl
2010-01