7.0
25 Feb 2014 20:47
uint limitedOxygen = 0;
bool onDrawHealth(jjPLAYER@ play, jjCANVAS@ canvas) {
if (limitedOxygen > 0 && limitedOxygen < 420) {
canvas.drawSprite(jjSubscreenWidth-12, jjSubscreenHeight-454, ANIM::AMMO, 8, 3, 0, SPRITE::NORMAL, 0); canvas.drawSprite(jjSubscreenWidth-28, jjSubscreenHeight-454, ANIM::AMMO, 8, 3, 0, SPRITE::NORMAL, 0); canvas.drawSprite(jjSubscreenWidth-44, jjSubscreenHeight-454, ANIM::AMMO, 8, 3, 0, SPRITE::NORMAL, 0); canvas.drawSprite(jjSubscreenWidth-60, jjSubscreenHeight-454, ANIM::AMMO, 8, 3, 0, SPRITE::NORMAL, 0);
canvas.drawSprite(jjSubscreenWidth-76, jjSubscreenHeight-454, ANIM::AMMO, 8, 3, 0, SPRITE::NORMAL, 0);
}
if (limitedOxygen > 420 && limitedOxygen < 840) {
canvas.drawSprite(jjSubscreenWidth-12, jjSubscreenHeight-454, ANIM::AMMO, 8, 3, 0, SPRITE::NORMAL, 0); canvas.drawSprite(jjSubscreenWidth-28, jjSubscreenHeight-454, ANIM::AMMO, 8, 3, 0, SPRITE::NORMAL, 0); canvas.drawSprite(jjSubscreenWidth-44, jjSubscreenHeight-454, ANIM::AMMO, 8, 3, 0, SPRITE::NORMAL, 0); canvas.drawSprite(jjSubscreenWidth-60, jjSubscreenHeight-454, ANIM::AMMO, 8, 3, 0, SPRITE::NORMAL, 0);
}
if (limitedOxygen > 840 && limitedOxygen < 1260) {
canvas.drawSprite(jjSubscreenWidth-12, jjSubscreenHeight-454, ANIM::AMMO, 8, 3, 0, SPRITE::NORMAL, 0); canvas.drawSprite(jjSubscreenWidth-28, jjSubscreenHeight-454, ANIM::AMMO, 8, 3, 0, SPRITE::NORMAL, 0); canvas.drawSprite(jjSubscreenWidth-44, jjSubscreenHeight-454, ANIM::AMMO, 8, 3, 0, SPRITE::NORMAL, 0);
}
if (limitedOxygen > 1260 && limitedOxygen < 1680) {
canvas.drawSprite(jjSubscreenWidth-12, jjSubscreenHeight-454, ANIM::AMMO, 8, 3, 0, SPRITE::NORMAL, 0); canvas.drawSprite(jjSubscreenWidth-28, jjSubscreenHeight-454, ANIM::AMMO, 8, 3, 0, SPRITE::NORMAL, 0);
}
if (limitedOxygen > 1680 && limitedOxygen < 2100) {
canvas.drawSprite(jjSubscreenWidth-12, jjSubscreenHeight-454, ANIM::AMMO, 8, 3, 0, SPRITE::NORMAL, 0);
}
return false;
}
void onPlayer(jjPLAYER@ play) {
if (play.yPos > jjWaterLevel) {
switch(play.shieldType) {
case 0: limitedOxygen++; play.shieldTime = 0; play.shieldType = 0; break;
case 1: limitedOxygen++; play.shieldTime = 0; play.shieldType = 0; break;
case 2: limitedOxygen = 0; break;
case 3: limitedOxygen++; play.shieldTime = 0; play.shieldType = 0; break;
case 4: limitedOxygen++; play.shieldTime = 0; play.shieldType = 0; break;
}
}
else { limitedOxygen = 0;
}
if (limitedOxygen == 2100) {
play.kill();
}
if (play.health == 0) limitedOxygen = 0;
}
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.