GetAnimationName

Category: Animations
Since engine version: 1.0 OC

Description

Returns the name of the animation with the given number. If there is no such animation with the given number or the number refers to a combination node then this function returns nil.

Syntax

string GetAnimationName(int animation_number, int attach_number);

Parameters

animation_number:
Animation number of the animation whose name to retrieve.
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(GetAnimationName(GetRootAnimation(5)) == "Walk") StopAnimation(GetRootAnimation(5));
If there is only one animation being played in slot 5 and its name is "Walk" then that animation is stopped.
See also: GetRootAnimation, PlayAnimation, StopAnimation
Clonk-Karl, 2010-01