Find - FormList

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: FormList Script

Searches for the specified form in the form list, returning its index (or a negative number if the form isn't found in the list)

Syntax[edit | edit source]

int Function Find(Form apForm) native

Parameters[edit | edit source]

  • apForm: Form to search for

Return Value[edit | edit source]

The index of the form in the form list. If the form isn't found, this number will be negative.

Examples[edit | edit source]

; Find the diamond in the form list
int index = GemList.Find(Diamond)
if index < 0
  Debug.Trace("Diamond doesn't exist in the form list!")
else
  Debug.Trace("Diamond is in the form list at position " + location)
endIf

See Also[edit | edit source]