Tomb Rabbit presets

Version:

1.0

Added on:

10 Feb 2013 13:23

Tags:

Description:
Nothing special, it's just a bunch of basic expression to use in a Tomb Rabbit level.
  1. //TOMB RABBIT LEVELS PRESETS
  2. uint minimusic = 0;  //Mini musics to use for trigger events and enemy ambushes.
  3. void onLevelLoad()
  4. {
  5. p.jumpStrength = -5;  //Harshly reduces the character's jump height.
  6. jjObjectPresets[OBJECT::BAT].energy = 10;
  7. jjObjectPresets[OBJECT::BEE].energy = 10;
  8. jjObjectPresets[OBJECT::DEMON].energy = 90;
  9. jjObjectPresets[OBJECT::DOGGYDOGG].energy = 30;
  10. jjObjectPresets[OBJECT::DRAGON].energy = 10;
  11. jjObjectPresets[OBJECT::LIZARD].energy = 10;
  12. jjObjectPresets[OBJECT::MONKEY].energy = 20;
  13. jjObjectPresets[OBJECT::NORMTURTLE].energy = 10;
  14. jjObjectPresets[OBJECT::RAVEN].energy = 20;
  15. jjObjectPresets[OBJECT::SKELETON].energy = 120;
  16. jjObjectPresets[OBJECT::STANDMONKEY].energy = 20;
  17. jjObjectPresets[OBJECT::TUFTURT].energy = 40;
  18. jjObjectPresets[OBJECT::BLASTERBULLET].counterEnd = 250;
  19. jjObjectPresets[OBJECT::BOUNCERBULLET].counterEnd = 250;
  20. jjObjectPresets[OBJECT::ICEBULLET].counterEnd = 250;
  21. jjObjectPresets[OBJECT::ICEBULLET].xSpeed = -4;
  22. jjObjectPresets[OBJECT::SEEKERBULLET].animSpeed = 10;
  23. jjObjectPresets[OBJECT::SEEKERBULLET].counterEnd = 250;
  24. jjObjectPresets[OBJECT::RFBULLET].animSpeed = 5;
  25. jjObjectPresets[OBJECT::ELECTROBULLET].xSpeed = 0;
  26. jjObjectPresets[OBJECT::ELECTROBULLET].ySpeed = 0;
  27. jjObjectPresets[OBJECT::BOUNCERBULLET].animSpeed = 5;
  28. jjObjectPresets[OBJECT::ELECTROBULLET].animSpeed = 110;
  29. }
  30. void onMain()
  31. {
  32. p.alreadyDoubleJumped = true;
  33. p.food = 50;                    //numbers 0-98 would work as well, anti-sugar rush mode.
  34. p.xSpeed = p.xSpeed * 0.875;    //This command will reduce the character's speed.
  35. if (p.ySpeed < -7) //These commands
  36. {                  //are meant
  37. p.xPos = p.xOrg;   //to prevent
  38. p.yPos = p.yOrg;   //the characters
  39. p.ySpeed = 0;      //from using
  40. }                  //their special
  41. if (p.xSpeed < -9  //moves.
  42. || p.xSpeed > 9)   //They also
  43. {                  //relocate
  44. p.xPos = p.xOrg;   //the player
  45. p.yPos = p.yOrg;   //to the start
  46. p.xSpeed = 0;      //so he can't
  47. }                  //kill enemies.
  48. if (p.currWeapon == WEAPON::BLASTER) //Regular Gun almost
  49. p.fastfire = 1000;                   //has no auto trigger.
  50. if (p.currWeapon == WEAPON::BOUNCER) //Bouncer shoots
  51. p.fastfire = 10;                     //WAY faster.
  52. if (p.currWeapon == WEAPON::ICE)     //Same as
  53. p.fastfire = 1000;                   //the Blaster.
  54. if (p.currWeapon == WEAPON::GUN8)    //Let the trigger quickly
  55. p.fastfire = 1;                      //or you will waste all the pepper!
  56. if (p.currWeapon == WEAPON::TOASTER) //Toasty Gun creates
  57. p.fastfire = 0;                      //a ravaging firestorm.
  58. if (p.currWeapon == WEAPON::GUN9)    //Electro Blaster
  59. p.fastfire = 20;                     //shoots a little faster.
  60. if (minimusic > 0)
  61. minimusic = minimusic - 1;   //How long the mini music lasts.
  62. }
  63. void onPlayer()
  64. {
  65. p.cameraFreeze(p.xPos, p.yPos, true, true);  //This command will center the camera even more.
  66. p.lives = 1;                                 //Same as unlimited lives
  67. }
  68. void onFunction1() { p.morphTo(CHAR::JAZZ, false); } //Spare a lot of televisions from blasts!
  69. void onFunction2() { p.morphTo(CHAR::SPAZ, false); } //Become Jazz or Spaz according to the situation.
  70. //THERE ARE STILL A FEW THINGS I CAN'T WORK OUT, LIKE MAKING THE SPIKES KILL YOU EVEN AT FULL HEALTH, SETTING MAX HEALTH IN SP MODE, MAKING BOLDERS KEEP ON ROLLING EVEN WHEN THEY TOUCH THE CHARACTER AND DISABLING HORIZONTAL MOVES IN MIDAIR.