GetRefTypeAliveCount - Location

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: Location Script

Obtains the number of alive enabled references matching the specified reference type in this location.

Syntax[edit | edit source]

int Function GetRefTypeAliveCount(LocationRefType akRefType) native

Parameters[edit | edit source]

Return Value[edit | edit source]

The number of alive enabled references in the location that have the specified location ref type.

Examples[edit | edit source]

; Obtain the number of alive ferrets in the location
int ferretCount = MyHouseProperty.GetRefTypeAliveCount(FerretRefTypeProperty)

Notes[edit | edit source]

This checks references whose editor location is the location only. It does NOT check for things that have "wandered" into it from elsewhere. It also does not check disabled refs.

See Also[edit | edit source]