Returns the total number of frames for the specified animation.



Argument Description
anim_name The animation name to get the frames of.

Returns: Integer


This function can be used to retrieve the number of frames that any given skeleton animation has. You supply the skeleton animation name (as a string, as defined in the program used to make the animation, or as returned by using the function skeleton_animation_get, and the function returns the frames that it has as an integer value. The function will return 0 if the specified animation does not exist.

IMPORTANT: Spine integration in GameMaker: Studio is a Pro licence feature and will not work in the Free/Standard versions.


var num = skeleton_animation_get_frames(skeleton_animation_get());
image_index = num -1;
image_speed = 0;

The above code will get the number of frames in the animation and then set the sprite to the last frame and stop animating.

Back: Skeletal Animations
Next: skeleton_animation_get_frame
© Copyright YoYo Games Ltd. 2018 All Rights Reserved