SHARE
TWEET

Untitled

a guest Nov 19th, 2019 95 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /// @description Move around
  2. if(z>=90)
  3. {
  4.     z=90;  
  5. }
  6.  
  7. if(hudApu==true)
  8. {
  9.     direction-=(display_mouse_get_x()-display_get_width()/2)/10;
  10.     pitch=clamp(pitch-(display_mouse_get_y()-display_get_height()/2)/10, -90, 90);
  11. } else if(hudApu==false&&z<89)
  12. {
  13.     pitch-=0.05;
  14.    
  15. }
  16.  
  17. z -= (movement_speed-1.5);
  18.  
  19. display_mouse_set(display_get_width()/2, display_get_height()/2);
  20.  
  21. if (keyboard_check(vk_escape))
  22. {
  23.     game_end();
  24. }
  25.  
  26. /*if(movement_speed > 1)
  27. {
  28.     movement_speed = 1;
  29. } else if
  30. (movement_speed < 0 )
  31. {
  32.     movement_speed = 0;
  33. }*/
  34.  
  35. if(throttle > 1)
  36. {
  37.     throttle = 1;
  38. } else if
  39. (throttle < 0 )
  40. {
  41.     throttle = 0;
  42. }
  43.  
  44. /*switch (keyboard_key)
  45. {
  46.     case vk_left:
  47.     case ord("A"):
  48.         x-=dsin(direction)*4;
  49.         y-=dcos(direction)*4;
  50.     break;
  51.     case vk_down:
  52.     case ord("S"):
  53.         z+=(pitch*0.1)*movement_speed;
  54.         x-=(dcos(direction)*4)*movement_speed;
  55.         y+=(dsin(direction)*4)*movement_speed;
  56.     break;
  57.     case vk_right:
  58.     case ord("D"):
  59.         x+=dsin(direction)*4;
  60.         y+=dcos(direction)*4;
  61.     break;
  62.     case vk_up:
  63.     case ord("W"):
  64.         z-=(pitch*0.1)*movement_speed;
  65.         x+=(dcos(direction)*4)*movement_speed;
  66.         y-=(dsin(direction)*4)*movement_speed;
  67.     break;
  68. }*/
  69. z-=(pitch*0.1)*movement_speed;
  70.         x+=(dcos(direction)*4)*movement_speed;
  71.         y-=(dsin(direction)*4)*movement_speed;
  72.        
  73. switch(keyboard_key)
  74. {
  75.     /*case vk_shift:
  76.         movement_speed += 0.01;
  77.     break;
  78.     case vk_space:
  79.         movement_speed -= 0.01;
  80.     break;*/
  81.     case ord("Q"):
  82.         throttle += 0.1/60;
  83.     break;
  84.     case ord("E"):
  85.         throttle -= 0.1/60;
  86.     break;
  87.     case vk_space:
  88.         if(z>=90)
  89.         {
  90.             throttle = 0;
  91.             movement_speed -= 0.02/60;
  92.         }
  93.     break;
  94. }
  95.  
  96. if (throttle > movement_speed )
  97. {
  98.     movement_speed+= (throttle - movement_speed) * .01
  99. } else if (throttle < movement_speed )
  100. {
  101.     movement_speed-= (movement_speed - throttle) * 0.002
  102. }
  103.  
  104. if(hudApu==false)
  105. {
  106.     throttle = 0;  
  107. }
  108.  
  109. if(z<88){
  110.     movement_speed -= (pitch/90)*0.001;
  111. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top