It's been awhile so I'm a bit rusty, and I probably just forgot, but I was under the impression that GetObjectByTag started at position 0. Maybe just put a debug line in the script and see how many it is destroying. Then change the 1 to 0 and see if it makes a difference?
void main()
{
object oPC = GetEnteringObject();
if (GetIsPC(oPC))
{
string sEnc = GetTag(OBJECT_SELF);
int n = 1;
object oEncounter = GetObjectByTag(sEnc, n);
while (oEncounter != OBJECT_INVALID)
{
SetEncounterActive(FALSE, oEncounter);
DestroyObject(oEncounter);
n++;
oEncounter = GetObjectByTag(sEnc, n);
SendMessageToPC(oPC, "Encounter Destroyed");
}
}
}
Modifié par GhostOfGod, 28 décembre 2012 - 07:59 .