IsRefInList

From the Fallout3 GECK Wiki
Revision as of 18:52, 1 July 2014 by imported>Odessa (Created page with "{{Function |origin = NVSE |summary = Returns the index of an object in a form list. If the object is contained in the list exactly, this index is returned, otherwise if the...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
< [[::Category:Functions|Category:Functions]]

A function added by the New Vegas Script Extender.

Description

Returns the index of an object in a form list. If the object is contained in the list exactly, this index is returned, otherwise if the base form or a leveled form of the object is contained, this index is returned. If the object is not contained in the list in either reference, base, or leveled form, the constant -1 is returned.

Syntax

[help]
(Index:int) IsRefInList ToCheck:formlist For:anyform

Example

; Form list FL contains: SunnyREF, GSSunnySmiles, GSCheyenne 

IsRefInList FL, SunnyREF ; * returns 0

IsRefInList FL, CheyenneREF ; * returns 2

IsRefInList FL, EasyPeteREF ; * returns -1, for Not Found. 

See Also