playAnimation

Script::playAnimation

Plays an Animation on an Entity.

Declaration

void playAnimation(Entity entity, uint32_t animationIndex);

Parameters

Name

Type

Description

entity

Entity

The Entity to play the Animation of. It must have a Renderable Component.

animationIndex

uint32_t

The animation to play, indexed on entity's Renderable’s model’s Animation list.

Returns

None.

Notes

If another Animation of entity is being played, it is getting replaced by the new one.

If the Animation is already playing, this function does nothing.

If the Animation is paused, with the Scripting API’s function pauseAnimation or the Graphics Module’s pauseAnimation function, it will resume at the moment it was paused.