I'm making a platformer and my character isn't doing a run animation when he is on the ground. He doesn't move and just stands there. I think it's a collision error but idk. Here's my code:
if (!place_meeting(x,y+1,o_wall))
{
sprite_index = s_playerAirborne;
image_speed = 0;
if (sign(vsp) > 0) image_index = 1; else image_index = 0;
}
else
{
image_speed = 1;
if (hsp == 0)
{
sprite_index = s_player;
}
else
{
sprite_index = s_playerRun;
}
}
The
if (!place_meeting(x,y+1,o_wall))
y+1 is messing my game up, how do I fix this? I saw how to write this code from Shaun Spalding.
if (!place_meeting(x,y+1,o_wall))
{
sprite_index = s_playerAirborne;
image_speed = 0;
if (sign(vsp) > 0) image_index = 1; else image_index = 0;
}
else
{
image_speed = 1;
if (hsp == 0)
{
sprite_index = s_player;
}
else
{
sprite_index = s_playerRun;
}
}
The
if (!place_meeting(x,y+1,o_wall))
y+1 is messing my game up, how do I fix this? I saw how to write this code from Shaun Spalding.
Last edited: