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
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;