GetRootAnimation

Category: Animations
Since engine version: 1.0 OC

Description

Returns the number of the animation at the top of the given slot. This animation is combined with the animation of the next smaller slot number and the result of this combination will be combined with the animation at the top of the slot with the next higher slot number, or, if there is no such slot, be the final output displayed on the screen. If the slot contains more than one animation then the animation at the top is always a combination node which combines multiple animations or other combinations of animations to the result of the slot. Returns nil if there are no animations in the given slot.

Syntax

int GetRootAnimation(int slot, int attach_number);

Parameters

slot:
Slot whose topmost animation shall be returned.
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

StopAnimation(GetRootAnimation(5));
Removes all animations in slot 5 so that it does not contain any animations anymore afterwards.
See also: PlayAnimation, StopAnimation
Clonk-Karl, 2010-01