Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///Movement
- if keyboard_check(key_forward) and !keyboard_check(key_backward)
- {
- if place_free(x+movespeed+1*movedir,y)
- {
- if movedir = 1 and movespeed < movespeed_cap
- {
- if gravity = 0
- {movespeed += .5}
- if gravity > 0
- {movespeed += .25}
- }
- if movedir = -1 and movespeed > movespeed_cap*-1
- {
- if gravity = 0
- {movespeed -= .5}
- if gravity > 0
- {movespeed -= .25}
- }
- }
- }
- if keyboard_check_pressed(key_jump) and jump = 1 and wall_cling = 0 and !input_pressmulti(key_jump,key_down,-2,-2,-2)
- {
- vspeed = 0
- vspeed -= 3.5 ; jump = 2
- }
- if keyboard_check_pressed(key_jump) and jump = 0 and wall_cling = 0 and !input_pressmulti(key_jump,key_down,-2,-2,-2)
- {
- vspeed = 0
- vspeed -= 4 ; jump = 1
- }
- if keyboard_check_pressed(key_jump) and wall_cling = 1
- {
- vspeed = 0
- vspeed -= 3
- movespeed = -3
- endlag = 15
- wall_cling = 0
- movedir = -1
- }
- if keyboard_check_pressed(key_jump) and wall_cling = -1
- {
- vspeed = 0
- vspeed -= 3
- movespeed = 3
- endlag = 15
- wall_cling = 0
- movedir = 1
- }
- if keyboard_check_released(key_jump) and gravity > 0 and vspeed < 0
- {
- vspeed /= 2
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement