/* Enemies drop ammo 2.0, by PurpleJazz http://www.jazz2online.com/snippets/84/enemies-drop-ammo/ */ jjOBJ@ enemy; void onPlayer() { for (int i = 1; i < jjObjectCount; i++) { @enemy = jjObjects[i]; if (enemy.objType >= 16 && enemy.state == STATE::KILL && enemy.isActive && jjGameTicks%7 == 0) { randomizer(); } } } void randomizer() { switch (jjRandom()%8) { case 0: jjAddObject(OBJECT::BOUNCERAMMO3, enemy.xPos, enemy.yPos, p.playerID, CREATOR::PLAYER); break; case 1: jjAddObject(OBJECT::ICEAMMO3, enemy.xPos, enemy.yPos, p.playerID, CREATOR::PLAYER); break; case 2: jjAddObject(OBJECT::SEEKERAMMO3, enemy.xPos, enemy.yPos, p.playerID, CREATOR::PLAYER); break; case 3: jjAddObject(OBJECT::RFAMMO3, enemy.xPos, enemy.yPos, p.playerID, CREATOR::PLAYER); break; case 4: jjAddObject(OBJECT::TOASTERAMMO3, enemy.xPos, enemy.yPos, p.playerID, CREATOR::PLAYER); break; case 5: jjAddObject(OBJECT::TNTAMMO3, enemy.xPos, enemy.yPos, p.playerID, CREATOR::PLAYER); break; case 6: jjAddObject(OBJECT::GUN8AMMO3, enemy.xPos, enemy.yPos, p.playerID, CREATOR::PLAYER); break; case 7: jjAddObject(OBJECT::GUN9AMMO3, enemy.xPos, enemy.yPos, p.playerID, CREATOR::PLAYER); break; } }