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