A
Ammaccabanane
Guest
So i just bought gms2 and started a new project.
as i started inserting animations i noticed something. Unlike in gm1 if i set sprite_index = 0 it just locks on set index
now here is my draw event:
now the funny part is that it draws spr_mm_crouch correctly and the index goes up and resets, but for all the other animations it doesnt work at all, it just displays the first frame frozen and prints that set frame. I've checked all the animations over and over and i cant seem to find any differences, so i checked the code and found no problems. Then i tried to swap out spr_mm_crouch with any other one and it didnt work either so i really dont know what to do. I'm a newbie but if you know why this is happening please help D:
as i started inserting animations i noticed something. Unlike in gm1 if i set sprite_index = 0 it just locks on set index
now here is my draw event:
Code:
draw_self();
show_debug_message("image_index = "+ string(image_index));
if hsp_ == 0
{
if vsp_ == 0
{
if crouch
{
if sprite_index == spr_mm_idle
{
image_index = 0;
sprite_index = spr_mm_crouch;
image_speed = 1;
show_debug_message("image_index = "+ string(image_index));
}
}
else
{
image_index = 0;
sprite_index = spr_mm_idle;
image_speed = 1;
show_debug_message("image_index = "+ string(image_index));
}
}
}
if hsp_ != 0 {
image_index = 0;
sprite_index = spr_mm_walk;
image_speed = 1.5;
show_debug_message("image_index = "+ string(image_index));
}
now the funny part is that it draws spr_mm_crouch correctly and the index goes up and resets, but for all the other animations it doesnt work at all, it just displays the first frame frozen and prints that set frame. I've checked all the animations over and over and i cant seem to find any differences, so i checked the code and found no problems. Then i tried to swap out spr_mm_crouch with any other one and it didnt work either so i really dont know what to do. I'm a newbie but if you know why this is happening please help D: