R
Raptor_Guy
Guest
Hi, I'm in the middle of creating a Megaman X fan game, and I've got just about everything movement-wise, except for a good wall jumping system. When I'm touching a wall, my fall is slowed, and I can climb walls by jumping, getting pushed out, and grabbing back on. The problem comes when I try to jump off away from a wall; it's not very reliable. A lot of times, I'll start moving away from the wall slightly before I hit jump, and I fall.
Wall slide/jump code in step event:
Also: I can't wall jump/slide on right walls or find a way to dash off a wall. Thanks for your help!
Wall slide/jump code in step event:
Code:
if place_meeting(x+1, y, oSolid) && vspd > 0 {
grav = .2;
image_xscale = -1;
} else {
grav = 1;
}
if place_meeting(x-1, y, oSolid) && vspd > 0 {
grav = .2;
image_xscale = 1;
} else {
grav = 1;
}
if grav == .2 && keyboard_check_pressed(vk_up) && image_xscale == -1 {
vspd += jheight;
hspd += -16;
}
if grav == .2 && keyboard_check_pressed(vk_up) && image_xscale == 1 {
vspd += jheight;
hspd += 16;
}