• 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!

Difficulty with sprite animation

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);
 
C

CE Studios

Guest
I feel like this is the wrong topic to be troubleshooting code...
 
L

Lance46

Guest
I am not sure what you mean by wrong topic. I followed a video on how to post a question so I posted my question according to those directions. If there is a better location for this type of thing, please point me there.
Also, how can I make the code in my question look like code?
As earlier stated, I am at beginner level so please help purge me of my ignorance.
 
Top