NovaOzuka
Member
So yeah, my only reason for making an account here is because I'm trying to make a Platformer in Game Maker. I hit a snag in the coding, and I'm having trouble getting any help. Heck I can't even sign in here at home because of reCaptcha. Anyway, the code I'm using is right here.
The problem here is that no matter what I do, the player isn't pushed off the wall, so they can just ascend the wall quickly and endlessly with no need of a second wall. They don't even leave the wall unless the player presses the arrow key to get off the wall. This happens no matter what I make hsp equal. If anyone has any idea how to fix this, please let me know.
//Wall Jump
if (place_meeting(x-1,y,obj_wall)) and (!place_meeting(x+1,y,obj_wall))
{
if (key_jump) and (!place_meeting(x,y+1,obj_wall))
{
vsp = -7;
hsp = -5;
}
}
if (place_meeting(x+1,y,obj_wall)) and (!place_meeting(x-1,y,obj_wall))
{
if (key_jump) and (!place_meeting(x,y+1,obj_wall))
{
vsp = -7;
hsp = 5;
}
}
if (place_meeting(x-1,y,obj_wall)) and (!place_meeting(x+1,y,obj_wall))
{
if (key_jump) and (!place_meeting(x,y+1,obj_wall))
{
vsp = -7;
hsp = -5;
}
}
if (place_meeting(x+1,y,obj_wall)) and (!place_meeting(x-1,y,obj_wall))
{
if (key_jump) and (!place_meeting(x,y+1,obj_wall))
{
vsp = -7;
hsp = 5;
}
}