IsRefInList

From GECK
Jump to: navigation, search


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. 

Notes

  • References must be flagged persistent if included in a formlist otherwise they will be cleared.

See Also