(Formerly known as AnimateObject, which is now obsolete)
(Formerly known as AnimateObjectEx, which is now obsolete)
Object.Animate(int loop, int delay, optional RepeatStyle,
optional BlockingStyle, optional Direction)
Starts the object animating, using loop number LOOP of its 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.
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.
If RepeatStyle is 2 then it will do the animation once, but then return
the graphic to the first frame and stop (whereas repeat=0 will leave the
graphic on the last frame).
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.
direction specifies which way the animation plays. You can either pass eForwards (the
default) or eBackwards.
You need to use SetView at some stage before this command, in order to set up the object's
current view.
Example:
object[0].Animate(2, 5);
object[1].Animate(1, 3, eOnce, eBlock, eBackwards);
will animate object 0 using loop 2 of its current view, at speed 5, and play the
animation once only. This happens in the background.
Then, object 1 will animate backwards using loop 1 of its current view, at speed 3. The
function won't return until the animation is finished.
See Also: Character.Animate,
Object.Animating, Object.SetView,
Object.StopAnimating
|