Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "zcommon.acs"
- script 999 enter
- {
- Thing_ChangeTID (0, 1337+PlayerNumber());
- }
- SCRIPT 990 ENTER
- {
- if(PlayerNumber()==0) //(PLAYER 1)
- {
- acs_execute(2,0,0,0,0);
- acs_execute(4,0,0,0,0);
- }
- bool doubleJumped1 = false; // True if the player has recently performed a double jump (PLAYER 1)
- // SETUP & HUD DISPLAY (PLAYER 1)
- script 2 (void)
- {
- setfont("smallfont");
- while(true)
- {
- // Tell the player whether or not he can double jump
- if(!doubleJumped1)
- HudMessage(s:"[//////////]"; HUDMSG_PLAIN, 1, CR_GREEN, 0, 0.1, 999.999);
- else
- HudMessage(s:""; HUDMSG_PLAIN, 0, CR_RED, 0, 0.1, 999.999);
- Delay(1);
- }
- }
- // DOUBLE JUMP DETECTOR/ACTIVATOR (PLAYER 1)
- script 4 (void)
- {
- setfont("smallfont");
- while(true)
- {
- playerHeight = GetActorZ(1337)-GetActorFloorZ(1337); // Get the player's height off the ground
- // If the player presses the jump button, is at least 10 units off the ground, and hasn't double jumped recently...
- if((GetPlayerInput(-1, MODINPUT_BUTTONS) & BT_JUMP) && !(GetPlayerInput(-1, INPUT_OLDBUTTONS) & BT_JUMP) &&
- (playerHeight > 10.00) && (!doubleJumped1))
- {
- thingsound(1337,"sound/EXOJUMP", 127);
- ThrustThingZ(01337, 100, 0, 0); // Perform a double jump
- doubleJumped1 = true; // Indicate that the player has double jumped
- HUDMESSAGE(s:"[----------]";
- HUDMSG_PLAIN, 1, CR_RED, 0, 0.1, 999.999);
- DELAY(20);
- HUDMESSAGE(s:"[/---------]";
- HUDMSG_PLAIN, 1, CR_RED, 0, 0.1, 999.999);
- DELAY(20);
- HUDMESSAGE(s:"[//--------]";
- HUDMSG_PLAIN, 1, CR_RED, 0, 0.1, 999.999);
- DELAY(20);
- HUDMESSAGE(s:"[///-------]";
- HUDMSG_PLAIN, 1, CR_RED, 0, 0.1, 999.999);
- DELAY(20);
- HUDMESSAGE(s:"[////------]";
- HUDMSG_PLAIN, 1, CR_ORANGE, 0, 0.1, 999.999);
- DELAY(20);
- HUDMESSAGE(s:"[/////-----]";
- HUDMSG_PLAIN, 1, CR_ORANGE, 0, 0.1, 999.999);
- DELAY(20);
- HUDMESSAGE(s:"[//////----]";
- HUDMSG_PLAIN, 1, CR_ORANGE, 0, 0.1, 999.999);
- DELAY(20);
- HUDMESSAGE(s:"[///////---]";
- HUDMSG_PLAIN, 1, CR_YELLOW, 0, 0.1, 999.999);
- DELAY(20);
- HUDMESSAGE(s:"[////////--]";
- HUDMSG_PLAIN, 1, CR_YELLOW, 0, 0.1, 999.999);
- DELAY(20);
- HUDMESSAGE(s:"[/////////-]";
- HUDMSG_PLAIN, 1, CR_YELLOW, 0, 0.1, 999.999);
- DELAY(20);
- HUDMESSAGE(s:"[//////////]";
- HUDMSG_PLAIN, 1, CR_GREEN, 0, 0.1, 999.999); // Delay, then reset ability to double jump
- doubleJumped1 = false;
- }
- Delay(1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment