Downloads containing JJDR_05.j2as

Downloads
Name Author Game Mode Rating
JJ2+ Only: Jazz Jackrabbit 2,5 - The...Featured Download Sly Single player 8.4 Download file

File preview

  1. const bool MLLESetupSuccessful = MLLE::Setup(); ///@MLLE-Generated
  2. #include "MLLE-Include-1.5.asc" ///@MLLE-Generated
  3. #pragma require "JJDR_05-MLLE-Data-2.j2l" ///@MLLE-Generated
  4. #pragma require "JJDR_05-MLLE-Data-1.j2l" ///@MLLE-Generated
  5. #pragma require "MuckamokDay.j2t" ///@MLLE-Generated
  6. #pragma require "Jungle 3M.j2t" ///@MLLE-Generated
  7. #pragma require "CarrFix.j2t" ///@MLLE-Generated
  8. #pragma require "Fortress.j2t" ///@MLLE-Generated
  9. #pragma require "Jungle2_1.00gx.j2t" ///@MLLE-Generated
  10. #pragma require "CarrFixE.j2t" ///@MLLE-Generated
  11. #pragma require "LomatLn.j2t" ///@MLLE-Generated
  12. #pragma require "Medivo2.j2t" ///@MLLE-Generated
  13. #pragma require "JJDR_05.j2l" ///@MLLE-Generated
  14.  
  15. /******************************************
  16. The four main functions used by the player timer are timerStart, timerStop, timerPause, and timerResume,
  17. all methods of jjPLAYER objects. They work pretty intuitively -- the only one that even takes any
  18. parameters is timerStart, which requires you to choose the number of ticks the timer should last.
  19. It is possible at any point thereafter to set the number of ticks remaining on the timer with
  20. the jjPLAYER property timerTime. timerStart also takes an (optional) boolean parameter which,
  21. if true, pauses the timer when it starts. Thus it is possible for the player to see how much time
  22. they'll have to perform a task before they actually go into the relevant area and presumably
  23. call the timerResume method.
  24. ******************************************/
  25. void onFunction0(jjPLAYER@ play) { if (play.timerState != TIMER::STARTED) play.timerStart(0*0, false); }
  26. void onFunction1(jjPLAYER@ play) { play.timerStop(); }
  27. void onFunction2(jjPLAYER@ play) { play.timerPause(); }
  28. void onFunction3(jjPLAYER@ play) { play.timerResume(); }
  29.  
  30. void onFunction4(jjPLAYER@ play, bool happy) { //the timerFunction jjPLAYER method specifies which function to call when the timer expires.
  31.         if (happy) play.timerFunction(giveShield); //note that you can pass the function itself as the parameter, rather than a string or something
  32.         else play.timerFunction(onPlayerTimerEnd);
  33.         jjSample(play.xPos, play.yPos, SOUND::COMMON_UP);
  34. }
  35. void giveShield(jjPLAYER@ play) {
  36.         play.shieldTime = 5*70; //70 ticks per second, so: five seconds long
  37.         play.shieldType = (jjRandom()&3) + 1; //1, 2, 3, or 4
  38. }
  39. void onPlayerTimerEnd(jjPLAYER@ play) { //This is the default function called when a timer expires.
  40.         play.kill();
  41. }
  42.  
  43. void onFunction5(jjPLAYER@ play, bool persist) {
  44.         play.timerPersists = persist;
  45. }
  46.  
  47. #include "JJDR.asc"