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