• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker Problem with Spine Animation GMS2

S

SoulManatee

Guest
Hi! Recently, I've been working on a project involving Spine, but I've had quite a bit of trouble getting the animations to work properly with the latest version of GMS2. I have a fully articulate character with a "Run Cycle" and "Idle" animation that work fine on Spine. They mix well in the Skeleton Viewer, as well. My problem is when it comes to GMS2. I run the code shown below to run and mix the animations, but it doesn't reset bone positioning when transitioning between "Run Cycle" and "Idle." This causes it it to play the "Idle" animation without moving the bones from the "Run Cycle" position (i.e. the character's legs are frozen running but he is idling at the same time). I don't know if it is a problem with my code or GMS2, but I would love to hear your support! Thanks in advance, SoulManatee.

//Create Event of Player Object

skeleton_animation_set("Idle");
skeleton_animation_mix("Idle", "Run Cycle", 0.5);
skeleton_animation_mix("Run Cycle", "Idle", 0.5);

//Step Event of Player Object

if(keyboard_check(ord("A")) || keyboard_check(ord("D")) || keyboard_check(ord("S")) keyboard_check(ord("W"))){
moving = true;
} else {
moving = false;
}

if(moving == true){
if(skeleton_animation_get() != "Run Cycle"){
skeleton_animation_set("Run Cycle");
}
}

if(moving == false){
if(skeleton_animation_get() != "Idle"){
skeleton_animation_set("Idle");
}
}
 
Top