Name | Author | Game Mode | Rating | |||||
---|---|---|---|---|---|---|---|---|
Anniversary Bash 21 Levels | Jazz2Online | Multiple | N/A | |||||
Nidavellir | Toni_ | Capture the flag | 7.9 |
/*Information about the weapons and objects*/
const array<int> nonPUs = {0, 0, 24, 30, 33, 48, 56, 0, 0, 0, 0, 0, 0, 0}; //[1] = blaster, [2] = bnc , ...
const array<int> PUs = {0, 0, 25, 29, 34, 49, 57, 0, 0, 0, 0, 0, 0, 0}; //idem
int objectToWeapon(int eventID) {
int weaponID = 0;
switch(eventID) {
case OBJECT::BOUNCERAMMO15 : weaponID = WEAPON::BOUNCER; break;
case OBJECT::ICEAMMO15 : weaponID = WEAPON::ICE; break;
case OBJECT::SEEKERAMMO15 : weaponID = WEAPON::SEEKER; break;
case OBJECT::RFAMMO15 : weaponID = WEAPON::RF; break;
case OBJECT::TOASTERAMMO15 : weaponID = WEAPON::TOASTER; break;
}
return weaponID;
}
/*The rest!*/
void setOnlyBncFromGunCrates () {
for (uint j=0; j < 10;j++) {
if (j != WEAPON::BOUNCER) jjWeapons[j].comesFromGunCrates = false;
}
}
void setAmmoPresets(int Object) {
jjObjectPresets[Object].scriptedCollisions = true;
jjObjectPresets[Object].behavior = ammoBehaviour;
jjObjectPresets[Object].determineCurFrame();
jjObjectPresets[Object].state = STATE::FLOATFALL;
jjObjectPresets[Object].bulletHandling = HANDLING::IGNOREBULLET;
jjObjectPresets[Object].playerHandling = HANDLING::SPECIAL;
}
void ammoBehaviour(jjOBJ@ obj) {
int ammoType = objectToWeapon(obj.eventID);
obj.behave(BEHAVIOR::PICKUP, false);
obj.xPos = obj.xOrg;
obj.yPos = obj.yOrg;
if (obj.justHit == 0) {
jjDrawResizedSprite(obj.xPos, obj.yPos, ANIM::AMMO,
jjLocalPlayers[0].powerup[ammoType] == true? nonPUs[ammoType]:PUs[ammoType],
jjGameTicks >> 2, 2, 2, SPRITE::NORMAL);
}
}
void onObjectHit(jjOBJ@ obj, jjOBJ@ bullet, jjPLAYER@ play, int force) {
int ammoType = objectToWeapon(obj.eventID);
if (ammoType>0 && play.isLocal) {
if (play.ammo[ammoType] == 0 && jjAutoWeaponChange) play.currWeapon = ammoType;
if (play.ammo[ammoType] < 30) play.ammo[ammoType] = 30;
}
}
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.