(Formerly known as AnimateCharacter, which is now obsolete)
(Formerly known as AnimateCharacterEx, which is now obsolete)
Character.Animate(int loop, int delay, optional RepeatStyle,
optional BlockingStyle, optional Direction)
Starts the character animating, using loop number LOOP of his current view. The
overall speed of the animation is set with DELAY, where 0 is the fastest, and
increasing numbers mean slower. The delay for each frame is worked out as DELAY + FRAME SPD,
so the individual frame speeds are relative to this overall speed.
Before using this command, you should use LockView in order
to select the view you want to animate with and prevent any automatic animations (eg.
walking or idle animations) from playing.
The RepeatStyle parameter sets whether the animation will continuously repeat
the cycling through the frames. This can be eOnce (or zero), in which case the animation
will start from the first frame of LOOP, and go through each frame in turn until the
last frame, where it will stop. If RepeatStyle is eRepeat (or 1), then when the last frame
is reached, it will go back to the first frame and start over again with the animation.
direction specifies which way the animation plays. You can either pass eForwards (the
default) or eBackwards.
For blocking you can pass either eBlock (in which case the function will wait
for the animation to finish before returning), or eNoBlock (in which case the animation
will start to play, but your script will continue). The default is eBlock.
If the character is currently moving, it will be stopped.
Example:
cEgo.LockView(5);
cEgo.Animate(3, 1, 0, eBlock, eBackwards);
cEgo.UnlockView();
will animate the character once using loop number 3 of view 5 backwards, and
wait until the animation finishes before returning.
See Also: Object.Animate
|