[SOLVED] wall jumping

Abobey

Member
Hi guys so I don't know if I need to learn more about what each function and variables do in GML before trying to create my own code but I'm trying to create a wall jump mechanism I tried this code but it does not work
if (key_jump) && (place_meeting(x+1,y,oWall)) && place_meeting(x-1,y,oWall) {
jumps = 1;
}

i figured it out thanks to @FrostyCat heres the code if you want to use it

if (place_meeting(x+1,y,oWall)) - (place_meeting(x-1,y,oWall)) and (key_jump)
{
vsp = -7.5;
}
 
Last edited:

FrostyCat

Member
Read the code aloud to yourself. You should immediately hear something absurd about it, and if you have any common sense, also know how to fix it.

This is what your code reads: If the jumping key is pressed AND there's a wall to my right AND there's a wall to my left, start jumping.
 
Top