I've attached the .pk3 to this post. It requires Project Brutality v2.03 and PB Overhaul.
I'm encountering a new issue where execution of the script just appears to stop after defining one of the arrays. This is the updated code:
Code: Select all
#library "DeathDrop"
#include "zcommon.acs"
#define ammoTypeCount 7
#define delayTimeTics 1
Script "YouGodDamnDied" DEATH
{
//At least we can drop weapons
DropInventory(0, "Revolver");
DropInventory(0, "Super_Grenade_Launcher");
DropInventory(0, "FreezerRifle");
DropInventory(0, "Grenade_Launcher");
DropInventory(0, "Rocket_Launcher");
DropInventory(0, "Plasma_Gun");
DropInventory(0, "M2PlasmaRifle");
DropInventory(0, "Rail_Gun");
DropInventory(0, "BHGen");
DropInventory(0, "PlasmaBeam");
DropInventory(0, "BIG_FUCKING_GUN_MKIV");
DropInventory(0, "Hell_rifle");
DropInventory(0, "NewLMG");
PrintBold(s:"Weapons dropped");
int angle = GetActorAngle(0);
int x = GetActorX(0);
int y = GetActorY(0);
int z = GetActorZ(0) + 28;
PrintBold(s:"Location calculated");
int multiplier = 1;
if ((GetCVar("DMFlags2") & 64) != 0)
{
multiplier = 2;
}
PrintBold(s:"Multiplier set");
str ammoTypes[7] = { "PistolBullets", "NewShell", "NewClip", "HighExplosiveGrenadeRounds", "SpecialGrenadeRounds", "RocketAmmo", "Cell" };
PrintBold(s:"Defined ammo types");
str ammoDrops[7] = { "SmallBulletCartridge", "2Shells", "SmallClip", "HEGrenade", "SpecialGrenade", "RocketAmmo", "NewCell" };
PrintBold(s:"Defined ammo drops");
int dropCounts[7] = {10, 2, 10, 1, 1, 1, 20};
PrintBold(s:"Defined drop counts");
PrintBold(s:"Looping through ammo types");
int i;
for (i = 0; i < ammoTypeCount; i++)
{
PrintBold(d:i);
PrintBold(s:ammoTypes[i]);
while (CheckInventory(ammoTypes[i]) >= (dropCounts[i] * multiplier))
{
PrintBold(s:StrParam(s:"Dropping ammo type", s:ammoTypes[i]));
int uTid = UniqueTID();
if (Spawn(ammoDrops[i], x, y, GetActorZ(0), uTid))
{
TakeInventory(ammoTypes[i], dropCounts[i] * multiplier);
}
}
}
}
For some reason, it stops after the PrintBold "Defined ammo types". I'm not sure why it's failing in a different place now.
You do not have the required permissions to view the files attached to this post.