Downloads containing JJDR_03.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

const bool MLLESetupSuccessful = MLLE::Setup(); ///@MLLE-Generated
#include "MLLE-Include-1.5.asc" ///@MLLE-Generated
#pragma require "JJDR_03-MLLE-Data-1.j2l" ///@MLLE-Generated
#pragma require "CarrFixE.j2t" ///@MLLE-Generated
#pragma require "Jungle1.j2t" ///@MLLE-Generated
#pragma require "Medivo2.j2t" ///@MLLE-Generated
#pragma require "CrysilisV.j2t" ///@MLLE-Generated
#pragma require "Psych1.j2t" ///@MLLE-Generated
#pragma require "LomatLn.j2t" ///@MLLE-Generated
#pragma require "JJDR_03.j2l" ///@MLLE-Generated

/******************************************
The four main functions used by the player timer are timerStart, timerStop, timerPause, and timerResume,
all methods of jjPLAYER objects. They work pretty intuitively -- the only one that even takes any
parameters is timerStart, which requires you to choose the number of ticks the timer should last.
It is possible at any point thereafter to set the number of ticks remaining on the timer with
the jjPLAYER property timerTime. timerStart also takes an (optional) boolean parameter which,
if true, pauses the timer when it starts. Thus it is possible for the player to see how much time
they'll have to perform a task before they actually go into the relevant area and presumably
call the timerResume method.
******************************************/
void onFunction0(jjPLAYER@ play) { if (play.timerState != TIMER::STARTED) play.timerStart(0*0, false); }
void onFunction1(jjPLAYER@ play) { play.timerStop(); }
void onFunction2(jjPLAYER@ play) { play.timerPause(); }
void onFunction3(jjPLAYER@ play) { play.timerResume(); }

void onFunction4(jjPLAYER@ play, bool happy) { //the timerFunction jjPLAYER method specifies which function to call when the timer expires.
	if (happy) play.timerFunction(giveShield); //note that you can pass the function itself as the parameter, rather than a string or something
	else play.timerFunction(onPlayerTimerEnd);
	jjSample(play.xPos, play.yPos, SOUND::COMMON_UP);
}
void giveShield(jjPLAYER@ play) {
	play.shieldTime = 5*70; //70 ticks per second, so: five seconds long
	play.shieldType = (jjRandom()&3) + 1; //1, 2, 3, or 4
}
void onPlayerTimerEnd(jjPLAYER@ play) { //This is the default function called when a timer expires.
	play.kill();
}

void onFunction5(jjPLAYER@ play, bool persist) {
	play.timerPersists = persist;
}

#include "JJDR.asc"