A workaround I came up with, that I do not like because it's klugy and this problem seems like it should be simpler than it's turning out to be, is to make an invisible placable and put a script on it's onheartbeat event.
Code: Select all
void main()
{
int i = 1;
object oDoor = GetNearestObject(OBJECT_TYPE_DOOR, OBJECT_SELF, i);
int nDieDoorDie = GetLocalInt(oDoor, "KillMePlease");
while (!(oDoor == OBJECT_INVALID)) {
if (nDieDoorDie != 0) {
DestroyObject(oDoor);
}
oDoor = GetNearestObject(OBJECT_TYPE_DOOR, OBJECT_SELF, i++);
nDieDoorDie = GetLocalInt(oDoor, "KillMePlease");
}
DestroyObject(OBJECT_SELF);
}
Then place that placable in the specific area, where the door is that is flagged to be destroyed.
The script would destroy the door(s) that are flagged, and the placable itself when the module loads, and then neither door nor placable onheartbeat scripts are firing after that.
Like I said, this problem seems simpler than it's turning out to be, but I'm at a loss how to make it simpler.
Terror2001