Kategorie: Animationen
Ab Engineversion: 6.0 OC


The value depends on the distance travelled by the aboject. Every pixel the object moves increases the value a little bit. Once end has been reached the value is reset to begin. This is a combination of Anim_AbsX and Anim_AbsY, where the movement in both coordinates is considered.


array Anim_Dist(int position, int begin, int end, int length);


Startwert. Sollte innerhalb des von begin und end aufgespannten Intervalls liegen.
Beginn des Intervalls.
Schluss des Intervalls. Wenn end größer als begin ist, so nimmt der Wert mit der Bewegung des Objekts zu, andernfalls nimmt er ab.
Number of pixels to be moved for the animation to be played from begin to end.


Siehe die Animations-Dokumentation für eine Beschreibung des Animationssystems.


PlayAnimation("Fly", 5, Anim_Dist(0, 0, GetAnimationLength("Fly"), 20), Anim_Const(1000));
Plays the animation "Fly" in slot 5, superimposing any other potential animations in slot 5. The animation is played the faster the faster the object moves. Once it moved 20 pixels the animation has been played from begin to end and restarts at its beginning. This could be used for an engine animation of a flying object where the engine should only be animated as long as the object is moving.
Siehe auch: Anim_AbsX, Anim_AbsY, Anim_Action, Anim_Const, Anim_Dist, Anim_Linear, Anim_R, Anim_X, Anim_XDir, Anim_Y, Anim_YDir, PlayAnimation, SetAnimationPosition, SetAnimationWeight
Clonk-Karl, 2014-10