Guest User

Doom/Zandronum Advanced Warfare Exo-Jump Code

a guest
Jul 17th, 2015
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "zcommon.acs"
  2.  
  3. script 999 enter
  4. {
  5. Thing_ChangeTID (0, 1337+PlayerNumber());
  6. }
  7.  
  8. SCRIPT 990 ENTER
  9.  
  10. {
  11. if(PlayerNumber()==0) //(PLAYER 1)
  12. {
  13. acs_execute(2,0,0,0,0);
  14. acs_execute(4,0,0,0,0);
  15. }
  16.  
  17.  
  18.  
  19. bool doubleJumped1 = false; // True if the player has recently performed a double jump (PLAYER 1)
  20.  
  21. // SETUP & HUD DISPLAY (PLAYER 1)
  22. script 2 (void)
  23. {
  24. setfont("smallfont");
  25.     while(true)
  26.     {
  27.         // Tell the player whether or not he can double jump
  28.         if(!doubleJumped1)
  29.        
  30.             HudMessage(s:"[//////////]"; HUDMSG_PLAIN, 1, CR_GREEN, 0, 0.1, 999.999);
  31.         else
  32.             HudMessage(s:""; HUDMSG_PLAIN, 0, CR_RED, 0, 0.1, 999.999);
  33.        
  34.         Delay(1);
  35.     }    
  36. }
  37.  
  38.  
  39. // DOUBLE JUMP DETECTOR/ACTIVATOR (PLAYER 1)
  40. script 4 (void)
  41. {
  42. setfont("smallfont");
  43.     while(true)
  44.     {
  45.         playerHeight = GetActorZ(1337)-GetActorFloorZ(1337); // Get the player's height off the ground
  46.        
  47.         // If the player presses the jump button, is at least 10 units off the ground, and hasn't double jumped recently...
  48.         if((GetPlayerInput(-1, MODINPUT_BUTTONS) & BT_JUMP) && !(GetPlayerInput(-1, INPUT_OLDBUTTONS) & BT_JUMP) &&
  49.            (playerHeight > 10.00) && (!doubleJumped1))
  50.         {
  51.         thingsound(1337,"sound/EXOJUMP", 127);
  52.             ThrustThingZ(01337, 100, 0, 0); // Perform a double jump
  53.             doubleJumped1 = true; // Indicate that the player has double jumped
  54.              HUDMESSAGE(s:"[----------]";
  55.    HUDMSG_PLAIN, 1, CR_RED, 0, 0.1, 999.999);
  56.    DELAY(20);
  57.       HUDMESSAGE(s:"[/---------]";
  58.    HUDMSG_PLAIN, 1, CR_RED, 0, 0.1, 999.999);
  59.    DELAY(20);
  60.          HUDMESSAGE(s:"[//--------]";
  61.    HUDMSG_PLAIN, 1, CR_RED, 0, 0.1, 999.999);
  62.    DELAY(20);
  63.          HUDMESSAGE(s:"[///-------]";
  64.    HUDMSG_PLAIN, 1, CR_RED, 0, 0.1, 999.999);
  65.    DELAY(20);
  66.             HUDMESSAGE(s:"[////------]";
  67.    HUDMSG_PLAIN, 1, CR_ORANGE, 0, 0.1, 999.999);
  68.    DELAY(20);
  69.             HUDMESSAGE(s:"[/////-----]";
  70.    HUDMSG_PLAIN, 1, CR_ORANGE, 0, 0.1, 999.999);
  71.    DELAY(20);
  72.             HUDMESSAGE(s:"[//////----]";
  73.    HUDMSG_PLAIN, 1, CR_ORANGE, 0, 0.1, 999.999);
  74.    DELAY(20);
  75.                HUDMESSAGE(s:"[///////---]";
  76.    HUDMSG_PLAIN, 1, CR_YELLOW,  0, 0.1, 999.999);
  77.    DELAY(20);
  78.                   HUDMESSAGE(s:"[////////--]";
  79.    HUDMSG_PLAIN, 1, CR_YELLOW,  0, 0.1, 999.999);
  80.    DELAY(20);
  81.                   HUDMESSAGE(s:"[/////////-]";
  82.    HUDMSG_PLAIN, 1, CR_YELLOW,  0, 0.1, 999.999);
  83.    DELAY(20);
  84.                   HUDMESSAGE(s:"[//////////]";
  85.    HUDMSG_PLAIN, 1, CR_GREEN,  0, 0.1, 999.999); // Delay, then reset ability to double jump
  86.             doubleJumped1 = false;
  87.         }
  88.  
  89.         Delay(1);
  90.     }
  91. }
Advertisement
Add Comment
Please, Sign In to add comment