User Tools

Site Tools


set_animation_speed

Set Animation Speed


Changes the speed of an animation (in frames per second) for the specified entity. The animation name is case-sensitive.

Signature:

set_animation_speed(entity, animation_name, speed)
ArgumentDescriptionTypeRequired
entityEntity for which to modify the animation.EntityYes
animation_nameName of the animation (as defined in the Voxel Editor).StringYes
speedSpeed of the animation (in frames per second).NumberYes

Example:

set_animation_speed(entity["purple_slime"], "idle", 12);

Results: The purple slime's idle animation is updated to a speed of 12 frames per second.

Use the Set Animation Speed function (for the “walk” animation) in conjunction with Set Movement Speed to speed up or slow down a character's movement.


Editor Node:

Visual Demo:

set_animation_speed.txt · Last modified: 2021/04/21 18:49 by justin