Name | Author | Game Mode | Rating | |||||
---|---|---|---|---|---|---|---|---|
Urban Brawl | Foly | Battle | 8.2 |
void onLevelLoad() {
for (int i = 1; i < 255; i++) {
jjOBJ@ preset = jjObjectPresets[i];
if (preset.playerHandling == HANDLING::PICKUP) {
preset.behavior = CannotBeBuried(preset.behavior);
}
}
}
class CannotBeBuried : jjBEHAVIORINTERFACE {
CannotBeBuried(const jjBEHAVIOR &in behavior) {
originalBehavior = behavior;
}
void onBehave(jjOBJ@ obj) {
obj.behave(originalBehavior);
if (jjMaskedPixel(int(obj.xPos), int(obj.yPos + 8))) {
obj.state = STATE::FLOAT;
obj.isBlastable = false;
}
}
bool onObjectHit(jjOBJ@ obj, jjOBJ@ bullet, jjPLAYER@ player, int force) {
if (bullet is null) {
obj.behavior = originalBehavior;
if (player.objectHit(obj, force, obj.playerHandling))
return true;
obj.behavior = this;
}
return false;
}
private jjBEHAVIOR originalBehavior;
}
void onMain() {
for (int i = 1; i < jjObjectCount; i++) {
if (jjObjects[i].isActive && jjObjects[i].eventID == OBJECT::COPTER && jjObjects[i].state == STATE::FLY) {
//Only set the counter if it's available to take
jjObjects[i].counter = 175;
if (jjObjects[i].var[4] == 0)
jjObjects[i].state = STATE::DONE;
}
else if (jjObjects[i].isActive && jjObjects[i].eventID == OBJECT::CARROT && jjObjects[i].xPos > 67*32 && jjObjects[i].xPos < 74*32 && jjObjects[i].yPos < 18*32 && jjObjects[i].yPos > (14*32 + 24)) {
jjObjects[i].particlePixelExplosion(0);
jjDeleteObject(i);
}
}
}
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.