Nice and simple. It would make my nightmare less of a nightmare. Simply put, when called, returns TRUE when the activator of the script still exists or FALSE if it has disappeared off of the map (items that have been picked up, things forcefully removed from ACS scripts or as part of their state cycle, etc.). ThingCount can't directly reference the activator so it can't reliably be used with scripts that are called directly by actors from DECORATE that don't have Thing IDs. It also can't tell the difference between a dead enemy and an object that has actually disappeared off of the map.
This is pretty much what I'm trying to do (this is called by an object on the map when it's first spawned after the level starts, which has no TID but can sometimes have one in certain cases):
Code: Select all
int FreeTID = 6000;
Script 962 (ThingType)
{
int SpawnTID = FreeTID;
FreeTID++;
If (CheckInventory(SpecialThings[ThingType])) Terminate;
Spawn("AGiantFingerPointingDown", GetActorX(0), GetActorY(0), GetActorZ(0), SpawnTID, 0);
While (ActivatorExists()) Delay(8);
Thing_Remove(SpawnTID);
}