[help] melee attack animations in GMS2
hello,
I am trying to code a melee attack in gms 2. however, the animation freezees midway through :
the animation is composed of 4 frames : the first one is my idle character, my second and third one are an attack sprite and my final frame is another idle character. however, right now, when I run the game, my character gets stuck halfway trough, until I move him around.
here's my current code :
(in a step event) : if (hsp == 0) && (vsp == 0) { image_speed = 0; } if (keyboard_check(vk_shift)) { sprite_index = spr_playahit; }
(in a animation end event) :
sprite_index = spr_playa;
spr_playa is my idle animation and spr_playa_hit is for my hitting animation.
thank you.
(note, I have tried putting it all in the step event, but it didn't change anyting)
Posted Aug 25, 2017, 11:39 AM UTC