PlayAnimation
This command makes an entity automatically play an animation sequence.
Syntax
- void PlayAnimation(const std::string& sequence, const float speed=1.0f, const int blendtime=500, const int mode=0)
- virtual void PlayAnimation(const int sequence, const float speed = 1.0f, const int blendtime = 500, const int mode = 0)
Parameters
- sequence: the sequence name or index of the animation to be played.
- speed: the speed at which to play the animation.
- blendtime: the number of milliseconds it takes for the current animation to smoothly replace the previously played animation.
- mode: set to zero for looping animation or one for one-shot animation. When one-shot animation mode is used, the script or actor function EndAnimation() will be called when the sequence is completed, passing the sequence number in as an argument.