Mod:Creation Kit/CountActors - EncounterZone

Member of: Mod:Creation Kit/EncounterZone Script

Gets the number of instantiated Actors (across all process levels) who belong to this encounter zone. Skips over dead, disabled, or deleted actors. Can optionally specify keywords for a linkedref that they MUST have, and/or a linkedref they must NOT have.

Syntax
int Function CountActors( apRequiredLinkedRefKeyword = None, apExcludeLinkedRefKeyword = None ) native

Parameters

 * apRequiredLinkedRefKeyword: If specified, Actors MUST have a LinkedRef using this Keyword, in order to be counted. If None, don't require any linkedref.
 * Default: None
 * apExcludeLinkedRefKeyword: If specified, SKIP OVER Actors that have a LinkedRef using this Keyword when doing the count. If None, don't exclude on the basis of any linkedref.
 * Default: None

Return Value
The number of instantiated Actors (across all process levels) who belong to this encounter zone (and meet the require/exclude linkedref keyword criteria).

Examples
int actorCount = Warehouse101Zone.CountActors( None, LookoutKeyword )
 * Count the number of instantiated non-"lookout" Actors (across all process levels) in the encounter zone "Warehouse101"