Q
Quantum_Compooter
Guest
I am new to GMS as in I have less than 24 hours with it. I am simply trying to go from an idle animation to a run animation and back. I am using Spine Pro for the sprite animation. Anytime I move my sprite it just freezes. If I understand correctly it is because every "tick" it is restarting my run animation but I do not know how to rectify this. Any help would be greatly appreciated.
Code:
key_right = keyboard_check(ord("D"));
key_left = keyboard_check(ord("A"));
mv_dir = key_right - key_left;
movement = mv_dir * walksp;
x += movement;
if(mv_dir != 0){
image_xscale = mv_dir;
skeleton_animation_set("Run");
}else{
skeleton_animation_set("Idle");
}