GetAnimationWeight

Category: Animations
Since engine version: 5.1 OC

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);

Parameter

animation_number:
Animation number of which the weight must be queried.

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.
See also: GetAnimationPosition, PlayAnimation, SetAnimationPosition, SetAnimationWeight
Clonk-Karl, 2010-01