Name | Author | Game Mode | Rating | |||||
---|---|---|---|---|---|---|---|---|
Jazz Jackrabbit 2,5 - The... | Sly | Single player | 8.4 |
void notAvailableWhenDroppedFromEnemies(jjOBJ@ obj) {
if (obj.creatorType == CREATOR::PLAYER) obj.delete(); else obj.behavior = BEHAVIOR::PICKUP;
}
void onLevelLoad() {
jjObjectPresets[OBJECT::SAVEPOST].deactivates = false;
jjObjectPresets[OBJECT::FASTFIRE].behavior = notAvailableWhenDroppedFromEnemies;
for (int i = 0; i < jjLocalPlayerCount; ++i)
jjLocalPlayers[i].charOrig = CHAR::JAZZ;
jjUseLayer8Speeds = true;
jjObjectPresets[OBJECT::CRAB].energy = 2;
jjObjectPresets[OBJECT::RAPIER].energy = -1;
jjObjectPresets[OBJECT::SPIKEBOLL].energy = 0;
jjObjectPresets[OBJECT::BOUNCERBULLET].behavior = BouncerNoWallWrapper;
jjObjectPresets[OBJECT::BOUNCERBULLETPU].behavior = BouncerPUNoWallWrapper;
if (jjDifficulty > 1) {
jjObjectPresets[OBJECT::DRAGONFLY].energy = 3;
jjObjectPresets[OBJECT::MONKEY].energy = 5;
jjObjectPresets[OBJECT::SKELETON].energy = 4;
jjObjectPresets[OBJECT::BUTTERFLY].energy = 2;
jjObjectPresets[OBJECT::LIZARD].energy = 2;
jjObjectPresets[OBJECT::STANDMONKEY].energy = 5;
jjObjectPresets[OBJECT::FENCER].energy = 5;
}
}
void onPlayer(jjPLAYER@ player) { player.food = 0; }
class HelpString {
int HelpID = -1;
int Timer = -200;
}
array<HelpString> HelpStrings(jjLocalPlayerCount);
jjTEXTAPPEARANCE spin(STRING::SPIN);
bool onDrawHealth(jjPLAYER@ player, jjCANVAS@ canvas) {
HelpString@ helpString = HelpStrings[player.localPlayerID];
const uint xTile = uint(player.xPos) / 32, yTile = uint(player.yPos) / 32;
if (jjEventGet(xTile,yTile) == AREA::TEXT && jjParameterGet(xTile,yTile, 8,10) == 0) {
const int helpID = jjParameterGet(xTile,yTile, 0,8);
if (helpID >= 100 && helpID <= 115) {
if (helpID - 100 != helpString.HelpID) {
helpString.Timer = jjGameTicks + 70;
helpString.HelpID = helpID - 100;
} else if (helpString.Timer < jjGameTicks) {
helpString.Timer = jjGameTicks;
}
}
}
const int time = helpString.Timer - jjGameTicks;
if (time > -70) {
spin.xAmp = spin.yAmp = (time == 0) ? 0 : 1;
spin.spacing = (time == 0) ? 2 : 1;
canvas.drawString(
0x8000 + time * int(abs(time)) / 10,
10,
jjHelpStrings[helpString.HelpID],
STRING::SMALL,
spin,
uint(abs(time)) * 3
);
} else
helpString.HelpID = -1;
return false;
}
void BouncerNoWallWrapper(jjOBJ@ obj) {
const bool right = obj.xSpeed >= 0;
obj.behave(BEHAVIOR::BOUNCERBULLET);
if (right != (obj.xSpeed >= 0))
obj.var[7] = -obj.var[7];
}
void BouncerPUNoWallWrapper(jjOBJ@ obj) {
const bool right = obj.xSpeed >= 0;
obj.behave(BEHAVIOR::BOUNCERBULLETPU);
if (right != (obj.xSpeed >= 0))
obj.var[7] = -obj.var[7];
}
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.