Category: Animations
Since engine version: 1.0 OC
GetAnimationWeight
Description
Returns the weight of a combination node. The weight specifies the relative portion the combined animations contribute to the resulting animation. The number is always between 0 (only the first animation contributes) and 1000 (only the second animation contributes). Returns
nil
if there is no such animation with the calling number or if the number refers to an animation node.Syntax
int GetAnimationWeight(int animation_number, int attach_number);
Parameters
- animation_number:
- Animation number of which the weight must be queried.
- attach_number:
- [opt] If given, refers to the number of the attached mesh to query instead of the object's main mesh.
Remark
See the animation documentation for further explanations of the animation system.
Example
if(GetAnimationWeight(animation_number) == 1000) StopAnimation(animation_number);
Removes the combination node "animation_number" if its weight has reached the value 1000.