Been doing some looking and it seems GetAssociate may provide some help here. Would still appreciate some insight into the above questions as well as any comments about the below.
In my OnExit script, I'm including the following (excerpted):
int iPCCount = GetLocalInt (oArea, "PCsInArea");
object oAssociate;
int iAssociate;
for (iAssociate =1; iAssociate<=99; iAssociate ++)
{
//looking for familiars
oAssociate = GetAssociate (ASSOCIATE_TYPE_FAMILIAR, oPC, iAssociate);
if (oAssociate ==OBJECT_INVALID)
{
iAssociate = iAssociate -1;
break;
}
}
iPCCount = iPCCount - 1 - iAssociate; //existing area PC count minus the PC minus the familiars
if (iPCCount <0)
{
iPCCount =0;
}
SetLocalInt (oArea, "PCsInArea", iPCCount);
I can then execute any area cleaners, etc..
Comments?
Modifié par BelowTheBelt, 27 décembre 2012 - 10:04 .