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

Windows Issue with Jumping code

W

whalekid

Guest
hi, i'm making a 2d platformer and my current code for jumping is such:
if !place_meeting (x, y+1, o_solid)
{
vspeed_ += gravity_;
} else{
if keyboard_check_pressed(vk_space)
vspeed_= -16; }
this works fine for the one object, but now i have another collision object (o_wall), and i can't jump while standing on it, and i can't find a way to include it in this code without making jumping impossible on both objects. if this isn't clear enough let me know, i'm pretty new to this stuff. thank you!
 
Top