void GiveFullSeekerAmmo(jjPLAYER@ play) { play.ammo[WEAPON::SEEKER] = 50; play.currWeapon = WEAPON::SEEKER; for (int i = 1; i < jjObjectCount; i++) { if (jjObjects[i].eventID == OBJECT::SEEKERPOWERUP) { jjAddParticlePixelExplosion(play.xPos, play.yPos, jjObjects[i].curFrame, jjObjects[i].direction, 2); } } jjSample(play.xPos, play.yPos, SOUND::COMMON_GLASS2, 63); jjSample(play.xPos, play.yPos, SOUND::COMMON_GLASS2, 63); //twice to amplify volume } void onPlayer(jjPLAYER@ play) { play.powerup[WEAPON::SEEKER] = true; if (jjGameTicks == 70) { GiveFullSeekerAmmo(play); } if (play.health == 0) { play.score = 70; } if (play.health > 0 && play.score > 0) { if (--play.score == 0) { GiveFullSeekerAmmo(play); } } }