ArcBasicDocs

Animate

Animates an entity.

Animate ( entity[,mode][,speed#][,sequence][,transition#] )

Parameters

entity
the entity's handle, usually from LoadAnimMesh.
mode (optional)
0 to stop; 1 to play over and over; 2 to play forward then backward, over and over; 3 to play once and stop at the end.
speed# (optional)
how fast to play it: 1 is normal, 0.5 half speed, and negative plays it backwards.
sequence (optional)
which animation to play, counting from 0, for models with several or ones made with ExtractAnimSeq.
transition# (optional)
how many frames to take blending from the current pose into the new animation, so it doesn't jump; 0 for no blending. The whole pose blends, bones of skinned characters included.

Description

Starts or stops an entity's animation, which then plays on each UpdateWorld. Calling Animate again with the animation that is already playing, and no transition, only changes its mode and speed, without starting it over. For a one-off action such as a jump, play it with mode 3, and when Animating gives back 0, go back to the idle animation. To mix two animations by an amount rather than over time, see BlendAnim.

See also