CountActors - EncounterZone
Jump to navigation
Jump to search
Member of: 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[edit | edit source]
int Function CountActors( apRequiredLinkedRefKeyword = None, apExcludeLinkedRefKeyword = None ) native
Parameters[edit | edit source]
- 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[edit | edit source]
The number of instantiated Actors (across all process levels) who belong to this encounter zone (and meet the require/exclude linkedref keyword criteria).
Examples[edit | edit source]
;Count the number of instantiated non-"lookout" Actors (across all process levels) in the encounter zone "Warehouse101"
int actorCount = Warehouse101Zone.CountActors( None, LookoutKeyword )