Plays an given animation on its parent object. Only objects loaded with LoadObjectWithChildren will have animations assigned to them. Animation names are defined by the modelling program when the animations were created, you can discover what the names are by using GetObjectAnimationName. The animation can be started and ended at any point in the animation using the start and end parameters, these are given in seconds, and if looping is turned on then the object will return to the given start time at the start of each loop. If you want the looping to be seamless then the bone positions at the start and end time must be exactly the same, as there will be no interpolation between them when it loops. The tweentime parameter can be used to interpolate between the current bone positions and the start time of the animation so that there is no sudden jump in bone positions. This tweening only happens once, it does not happen every loop, and does not contribute to the animation time. Essentially the animation is paused until tweening has finished. Note that as soon as this command is called the bones will be controlled by animation and cannot be moved with SetObjectBonePosition or similar commands. You can regain manual control of individual bones by using SetObjectBoneCanAnimate on it. You can regain control of the entire bone structure by using ResetObjectAnimation.


PlayObjectAnimation( objID, animName, starttime, endtime, loop, tweentime )