skeleton_skin_list

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

Syntax:

skeleton_skin_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 skins included as part of the skeletal animation sprite. The names will be strings and can then be used in the other skeleton animation skin 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_skin_list(sprite_index, list);
var num = ds_list_size(list);
skeleton_skin_set(list[| irandom(num - 1));
ds_list_destroy(list);

The above code creates a DS list then populates it with the skin names. A random one is then chosen and applied to the instance before the list is destroyed.


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