Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. //jumping
  2. if keyboard_check(ord('X')){
  3. my_state = 1;
  4. zaxis_speed = jump_speed;
  5. audio_play_sound(sfx_jump,0,false);
  6. }
  7.  
  8. //it's gravity!
  9. if(zaxis_speed<10){
  10. zaxis_speed += grav_speed;
  11.  
  12.  
  13. //z position on floor, radicool!
  14. if (my_z+zaxis_speed > my_ground_z){
  15. zaxis_speed = 0;
  16. my_z = my_ground_z;
  17. }
  18.  
  19. x += hor_speed *hor_count;
  20. y += ver_speed *ver_count;
  21. my_z += zaxis_speed;
  22. my_state = 0
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement