I've been able to get it to refill itself just fine using the following code:
void RefillHealthBarrel(object oObject)
{
if (UT_CountItemInInventory(R"gen_im_qck_injury_101.uti", oObject) == 0)
{
UT_AddItemToInventory(R"gen_im_qck_injury_101.uti", 2, oObject);
}
}Easy, peasy.
The problem is that the placeable can't be looted anymore - it has a loot glint and can be selected, but clicking on it does absolutely nothing. I've examined the core scripts and haven't found any clear bit of information suggesting exactly what the problem is - my guess it has something to do with the SendEventOpened() command setting a variable on the placeable, but I don't know how I'd reverse this.
Anyone have any ideas?
EDIT: Supplementary question. Anyone know how to remove corpses from an area? I have the following script to handle that, but it doesn't seem to work:
void DeadTeamCleanup(int nTeam)
{
object[] oTeam = GetTeam(nTeam);
int nSize = GetArraySize(oTeam);
int index;
for (index = 0; index < nSize; index++)
{
if (IsDead(oTeam[index]) == TRUE)
{
Safe_Destroy_Object(oTeam[index]);
}
}
}
Modifié par sea-, 28 juillet 2012 - 01:41 .





Retour en haut






