skeleton_animation_list

Populate a DS list with the names for all animations included in the sprite.

Syntax:

skeleton_animation_list(sprite, list);


Argument Description
sprite The sprite index of the Spine skeletal animation to get the list from.
list The ID of the DS list to populate with the animation names.


Returns: N/A


Description

With this function you can populate a (pre-created) ds_list with all the names of the animations included as part of the skeletal animation sprite. The names will be strings and can then be used in the other animation functions for these types of sprite.

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


Example:

var list = ds_list_create();
skeleton_animation_list(sprite_index, list);
for (var i = 1; i < ds_list_size(list); i++;)
   {
   skeleton_animation_mix(list[| 0], list[| i], 0.5);
   }
ds_list_destroy(list);

The above code creates a ds_list of all the animation names for the sprite being used by the instance. It then loops through these and sets the mix value for all of them with the first animation to 0.5.


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