Name | Author | Game Mode | Rating | |||||
---|---|---|---|---|---|---|---|---|
Anniversary Bash 25 Battle | Jazz2Online | Battle | N/A | |||||
Anniversary Bash 24 Battle | Jazz2Online | Battle | N/A | |||||
Anniversary Bash 22 levels | Jazz2Online | Multiple | N/A | |||||
The Abyss | PurpleJazz | Battle | 9.8 |
#pragma require "invisibilitycarrot.asc"
namespace InvisibilityCarrot {
int invisibilityTime;
void loadPresets(OBJECT::Object eventID) {
jjObjectPresets[eventID].scriptedCollisions = true;
jjObjectPresets[eventID].determineCurAnim(ANIM::PICKUPS, 72);
jjObjectPresets[eventID].determineCurFrame();
jjObjectPresets[eventID].behavior = InvisibilityCarrot();
}
class InvisibilityCarrot : jjBEHAVIORINTERFACE {
void onBehave(jjOBJ@ obj) {
obj.behave(BEHAVIOR::PICKUP);
}
bool onObjectHit(jjOBJ@ obj, jjOBJ@ bull, jjPLAYER@ play, int force) {
play.invisibility = true;
play.timerTime = invisibilityTime;
jjSample(obj.xPos, obj.yPos, SOUND::INTRO_END);
obj.behavior = BEHAVIOR::EXPLOSION2;
obj.scriptedCollisions = false;
obj.frameID = 0;
return true;
}
}
void playerSettings(jjPLAYER@ play) {
if (play.invisibility) jjDrawSpriteFromCurFrame(play.xPos, play.yPos, play.curFrame, play.direction, SPRITE::BLEND_LUMINANCE, 100, 4, 4);
if (play.invisibility && play.timerState == TIMER::STOPPED) play.timerStart(invisibilityTime);
if (!play.invisibility) play.timerStop();
if (play.timerState == TIMER::STARTED && play.timerTime <= 3*70 && play.timerTime > 0 && play.timerTime % 70 == 0) jjSamplePriority(SOUND::COMMON_NOCOIN);
if (play.timerTime == 1) {
play.invisibility = false;
jjSamplePriority(SOUND::COMMON_SHLDOF3);
}
}
void drawPlayers() {
for (int i = 0; i < 32; i++) {
jjPLAYER@ invisiblePlayer = jjPlayers[i];
if (invisiblePlayer.invisibility && !invisiblePlayer.isLocal) jjDrawSpriteFromCurFrame(invisiblePlayer.xPos, invisiblePlayer.yPos, invisiblePlayer.curFrame, invisiblePlayer.direction, SPRITE::BLEND_LUMINANCE, invisiblePlayer.keyFire? 100:15, 4, 4);
}
}
void drawTimer(jjPLAYER@ play, jjCANVAS@ canvas) {
if (play.invisibility == true) {
canvas.drawString(
jjSubscreenWidth - 73,
jjSubscreenHeight - 284,
"" + (play.timerTime + 70) / 70,
STRING::LARGE,
STRING::PALSHIFT,
play.timerTime > 3*70?
0 :
jjGameTicks % 28 > 14?
-40 :
-24
);
canvas.drawSprite(
jjSubscreenWidth - 90,
jjSubscreenHeight - 270,
ANIM::PICKUPS,
72,
jjGameTicks >> 2
);
}
}
}
Jazz2Online © 1999-INFINITY (Site Credits). We have a Privacy Policy. Jazz Jackrabbit, Jazz Jackrabbit 2, Jazz Jackrabbit Advance and all related trademarks and media are ™ and © Epic Games. Lori Jackrabbit is © Dean Dodrill. J2O development powered by Loops of Fury and Chemical Beats.
Eat your lima beans, Johnny.