Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// @description Move around
- if(z>=90)
- {
- z=90;
- }
- if(hudApu==true)
- {
- direction-=(display_mouse_get_x()-display_get_width()/2)/10;
- pitch=clamp(pitch-(display_mouse_get_y()-display_get_height()/2)/10, -90, 90);
- } else if(hudApu==false&&z<89)
- {
- pitch-=0.05;
- }
- z -= (movement_speed-1.5);
- display_mouse_set(display_get_width()/2, display_get_height()/2);
- if (keyboard_check(vk_escape))
- {
- game_end();
- }
- /*if(movement_speed > 1)
- {
- movement_speed = 1;
- } else if
- (movement_speed < 0 )
- {
- movement_speed = 0;
- }*/
- if(throttle > 1)
- {
- throttle = 1;
- } else if
- (throttle < 0 )
- {
- throttle = 0;
- }
- /*switch (keyboard_key)
- {
- case vk_left:
- case ord("A"):
- x-=dsin(direction)*4;
- y-=dcos(direction)*4;
- break;
- case vk_down:
- case ord("S"):
- z+=(pitch*0.1)*movement_speed;
- x-=(dcos(direction)*4)*movement_speed;
- y+=(dsin(direction)*4)*movement_speed;
- break;
- case vk_right:
- case ord("D"):
- x+=dsin(direction)*4;
- y+=dcos(direction)*4;
- break;
- case vk_up:
- case ord("W"):
- z-=(pitch*0.1)*movement_speed;
- x+=(dcos(direction)*4)*movement_speed;
- y-=(dsin(direction)*4)*movement_speed;
- break;
- }*/
- z-=(pitch*0.1)*movement_speed;
- x+=(dcos(direction)*4)*movement_speed;
- y-=(dsin(direction)*4)*movement_speed;
- switch(keyboard_key)
- {
- /*case vk_shift:
- movement_speed += 0.01;
- break;
- case vk_space:
- movement_speed -= 0.01;
- break;*/
- case ord("Q"):
- throttle += 0.1/60;
- break;
- case ord("E"):
- throttle -= 0.1/60;
- break;
- case vk_space:
- if(z>=90)
- {
- throttle = 0;
- movement_speed -= 0.02/60;
- }
- break;
- }
- if (throttle > movement_speed )
- {
- movement_speed+= (throttle - movement_speed) * .01
- } else if (throttle < movement_speed )
- {
- movement_speed-= (movement_speed - throttle) * 0.002
- }
- if(hudApu==false)
- {
- throttle = 0;
- }
- if(z<88){
- movement_speed -= (pitch/90)*0.001;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement