int ThingCountNameSector (str classname, int tid, int tag)
Counts the number of actors in a given sector matching the given name and TID.
- classname: The class name of the actors to count.
- tid: The Thing ID of the actor(s) to count. Use 0 to count actors regardless of TID.
- tag: The tag of the sector(s) to count actors in.
Returns the number of actors in the given sector(s) matching the given criteria.
This line counts the number of cacodemons with a tid of 62 in all sectors with a tag of 11:
int CacosPresent = ThingCountSector ("Cacodemon", 62, 11);
This line counts all actors with a class name of "MySuperImp" in sectors with tag 40:
int AllActors = ThingCountSector ("MySuperImp", 0, 40);