player can only jump once

Y

Yvalson

Guest
so i'm using phyics in my game but for some reason my player can only jump once (and not even coming close to as high as it should) and after that it looks like my player just wont jump at all. here is the code that should provide the necessary information

movement code:

///Movement
if (keyboard_check(vk_right)){
phy_position_x += Speed
sprite_index = Spr_Player_Run
image_xscale = 1
last_sprite = 0
}
if (keyboard_check(vk_left)){
phy_position_x -= Speed
sprite_index = Spr_Player_Run
image_xscale = -1
last_sprite = 1
}

if (keyboard_check(vk_up) && Jumping == false){
physics_apply_impulse(self.x, self.y, 0, -500)
Jumping = true
}

if (place_meeting(x,y+1, Obj_Stone) && !place_meeting(x+1,y, Obj_Stone)){
Jumping = false
}

if (place_meeting(x,y+1, Obj_Moving_Stone) && !place_meeting(x+1,y, Obj_Moving_Stone)){
Jumping = false
}
 
Top