• 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 2D simple character movement help

L

Laparra12

Guest
Hey, I wonder if u guys can help me I need to make a platform 2d jumping script but no idea



this is my code, It only goes left and right and falls, but no jumping
Code:
if(keyboard_check(vk_right) && place_free(x + collisionSpeed, y)){
    x+=spd;
    image_xscale = 1;
    


}
else if(keyboard_check(vk_left) && place_free(x - collisionSpeed, y))
{
    x-=spd;
        image_xscale = -1;
}


if(place_free(x,y+spd)){


y+=spdFall;
spdFall +=grvt;
if(spdFall > maxSpdFall){
    spdFall = maxSpdFall;   
    
}
}else {
spdFall = 2;
 
L

Laparra12

Guest
You can post your codes, the best jump type I prefer is the hold to jump
 
Top