GetRefTypeAliveCount - Location
Revision as of 08:30, 3 November 2014 by imported>SureAI-Nicolas
Member of: Location Script
Obtains the number of alive enabled references matching the specified reference type in this location.
NOTE: This checks references whose editor location is the locaiton only. It does NOT check for things that have "wandered" into it from elsewhere. It also does not check disabled refs.
SyntaxEdit
int Function GetRefTypeAliveCount(LocationRefType akRefType) native
ParametersEdit
- akRefType: The LocationRefType to search for.
Return ValueEdit
The number of alive enabled references in the location that have the specified location ref type.
ExamplesEdit
; Obtain the number of alive ferrets in the location
int ferretCount = MyHouseProperty.GetRefTypeAliveCount(FerretRefTypeProperty)
NotesEdit
There seems to be a bug with this function, causing it to return twice the amount of actual alive refs in a cell, until the .esp is merged in the masterfile. To work around this problem, simply add /2 at the end of the function, and undo this again if you're working with a masterfile.