Name | Author | Game Mode | Rating | |||||
---|---|---|---|---|---|---|---|---|
Anniversary Bash 20 Levels | Jazz2Online | Multiple | N/A |
const uint8 EXTRAAMMOPIECES = 3;
const int VANISHTIME = 560; //8 seconds
jjOBJ@ extrapiece;
void onLevelLoad() {
jjTexturedBGTexture = TEXTURE::PSYCH;
jjObjectPresets[OBJECT::ICEAMMO15].behavior = ExtraAmmoFrom15Crate;
jjObjectPresets[OBJECT::TOASTERAMMO15].behavior = ExtraAmmoFrom15Crate;
jjObjectPresets[OBJECT::FULLENERGY].behavior = StillPickup;
jjObjectPresets[OBJECT::ICEAMMO15].var[2] = OBJECT::GUN8AMMO3;
}
void ExtraAmmoFrom15Crate(jjOBJ@ obj) {
if (obj.state == STATE::START) {
obj.doesHurt = EXTRAAMMOPIECES;
obj.var[10] = obj.var[2];
}
if (obj.state == STATE::ACTION) {
while (obj.doesHurt > 0) {
@extrapiece = jjObjects[jjAddObject(obj.var[10], obj.xPos + jjRandom()%24, obj.yPos)];
extrapiece.behavior = BEHAVIOR::FLICKERGEM;
extrapiece.counter = VANISHTIME;
extrapiece.state = STATE::FLOATFALL;
obj.doesHurt--;
}
}
if (obj.eventID == OBJECT::ICEAMMO15) {
obj.behave(BEHAVIOR::AMMO15, false);
jjDrawTile(int(obj.xPos) - 12, int(obj.yPos) - 19, 628);
}
obj.behave(BEHAVIOR::AMMO15);
}
void StillPickup(jjOBJ@ obj) {
if (obj.state == STATE::FLOATFALL) obj.state = STATE::FLOAT;
obj.behave(BEHAVIOR::PICKUP);
}
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.