Set the skin that the skeletal animation sprite should be drawn with.



Argument Description
skinname The name (a string) of the skin to use.

Returns: N/A


A skeletal animation sprite can be drawn with a variety of textures (called "skins"), permitting you to use one single animation for multiple different purposes. For example, you may have a generic walk animation and this can be used by your NPC characters, enemies, etc... in a game simply by changing the skin it is drawn with. These skins need to have been previously created and named in your animation program, and this name is passed into the function (as a string) to set the sprite to use that skin when being drawn.

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


if skeleton_skin_get() == "skin_Enemy1"
   skeleton_skin_set(choose("skin_Enemy1", "skin_Enemy2", "skin_Enemy3");

The above code would check the currently assigned skin for the animation and if it is "skin_Enemy1", it chooses and sets a new skin from one of three options.

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