Lori Multiple Air Jumps

Version:

1.0

Added on:

09 Apr 2015 08:51

Tags:

Description:
Lori can use both Jazz's Air Jump and Spaz's Air Jump. By pressing "Z" Lori will be able to use helicopter ears, and by pressing "X" Lori will be able to use double jump.
  1. //Script by XxMoNsTeR
  2.  
  3. const int X = 0x58;
  4. const int Z = 0x5A;
  5.  
  6. bool zKeyHeld;
  7. bool xKeyHeld;
  8.  
  9. void onPlayer(jjPLAYER@ p) {
  10.   jjCHARACTER@ char = jjCharacters[p.charCurr];
  11.   if (p.charCurr == CHAR::LORI) {
  12.     if (zKeyHeld) {
  13.       char.airJump = AIR::HELICOPTER;
  14.       char.helicopterXSpeed = 0;
  15.       char.helicopterYSpeed = 2;
  16.       char.helicopterDurationMax = 9999999;
  17.     }
  18.     if (xKeyHeld) {
  19.       char.airJump = AIR::DOUBLEJUMP;
  20.       char.doubleJumpXSpeed = 0;
  21.       char.doubleJumpYSpeed = -6.5;
  22.       char.doubleJumpCountMax = 2;
  23.     }
  24.   }
  25.   zKeyHeld = jjKey[Z];
  26.   xKeyHeld = jjKey[X];
  27. }
  28.  
  29. bool onDrawScore(jjPLAYER@ p, jjCANVAS@ canvas) {
  30.   jjCHARACTER@ char = jjCharacters[p.charCurr];
  31.   if (p.charCurr == CHAR::LORI) {
  32.     canvas.drawString(5, 50, char.airJump == AIR::HELICOPTER ? "Helicopter Ears" : "Double Jump", STRING::SMALL, STRING::NORMAL);
  33.   }
  34.   return false;
  35. }