Background for Skyrim SE
Member of the FormList script
intfunctionFind(FormapForm)Native

Description

Wiki Description

Finds the specified form in the form list and returns its index or returns -1 if it's not a member.

Documentation Comment

Finds the specified form in the form list and returns its index.
If not found, returns a negative number


Caveats

CK Wiki - Notes

  • Using Find as a condition for an IF check will still return as TRUE if the value returns -1 for not having the form on the formlist. The IF check will require a != -1 in order to fail the check ex:    if MyFormList.Find(MyForm) != -1

Parameters

FormapForm

CK Wiki Description

The form whose index is to be returned.


Examples

Int iIndex = PotionFLST.Find(WhiteRussianALCH)
If iIndex == - 1
    Debug.Trace("WhiteRussianALCH is not a member of the PotionFLST.")
Else
    Debug.Trace("WhiteRussianALCH is a member of the PotionFLST and its index is " + iIndex + ".")
EndIf

Auto-Generated Example

Form myForm__apForm

int returnedValue = myFormList__toCallFunctionOn.Find(myForm__apForm)

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.