L
Lance46
Guest
I am at beginner level on game maker and I am going through a youtube tutorial and I cannot get my animation to match. I have a character that runs on the ground properly, stands properly, jumps proper if I only jump, but if I move left or right while jumping, the animation looks terrible wit his facial feature changing rapidly. I can find no differences between my code and the code in the tutorial. Why does mine look so bad when I animate.
Note: I drew my own sprites so the sprite don't match the tutorial, but I see no reason why that should cause such an issue. I have attached my code from my step event below.
sPlayer is standing
sPlayerA is airborn
sPlayerR is running
//Animation
if (!place_meeting(x,y+1,oWall))
{
image_speed = 0;
sprite_index = sPlayerA;
if (sign(vsp) > 0) image_index = 1; else image_index = 0;
}
else
{
image_speed = 1;
if (hsp == 0)
{
sprite_index = sPlayer;
}
else
{
sprite_index = sPlayerR;
}
}
if (hsp != 0) image_xscale = sign(hsp);
Note: I drew my own sprites so the sprite don't match the tutorial, but I see no reason why that should cause such an issue. I have attached my code from my step event below.
sPlayer is standing
sPlayerA is airborn
sPlayerR is running
//Animation
if (!place_meeting(x,y+1,oWall))
{
image_speed = 0;
sprite_index = sPlayerA;
if (sign(vsp) > 0) image_index = 1; else image_index = 0;
}
else
{
image_speed = 1;
if (hsp == 0)
{
sprite_index = sPlayer;
}
else
{
sprite_index = sPlayerR;
}
}
if (hsp != 0) image_xscale = sign(hsp);