Set the currently selected skeletal animation sprite to use multiple animation sets.


skeleton_animation_set_ext(animname, track);

Argument Description
animname The name (a string) of the animation set to use.
track The track for the animation set to use.

Returns: N/A


When you set an animation set for your skeletal animation sprite, it is assigned track 0 internally. However, you can assign further sets to further tracks (1 and above) and in this way have your sprite play two (or more) animations at the same time. Note that the sprite should have been designed in your animation program with this in mind, such that the "base" animation in track 0 only has keyframes for certain bones, while the next tracks have keyframes for the others. For example, if you have a "walk" animation and its keyframes only affect the legs of the sprite, you can then have a set of head animations and arm animations which you can set in tracks 1 and 2 respectively, permitting you to have a base movement and adapt on it in real-time while the game is being played.

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


if mouse_check_button(mb_left)
   skeleton_animation_set_ext("bodyfight", 1);
   skeleton_animation_set_ext("bodywalk", 1);

The above code will change the animation set being used by track 1 to the "bodyfight" set or the "bodywalk" set when the left mouse button is pressed.

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