GetAt - FormList

From the CreationKit Wiki
Revision as of 16:26, 18 October 2011 by imported>Rhavlovick (1 revision: Clobber re-import by Henning)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Member of: FormList Script

Returns the form at a specified index in the list.

Syntax

Form Function GetAt(int aiIndex) native

Parameters

  • aiIndex: The index in the list we want to fetch the form from
    • The index is 0-based. If a list has 3 items in it, valid indices are: 0, 1 and 2

Return Value

Returns the form at index aiIndex, none in case of error (such as wrong index value)

Examples

; Print out the forms in the list
FormList property list auto
int index = 0
While (index < list.GetSize())
  Debug.Trace("Form " + index + " is " + list.GetAt(index))
  index = index + 1
EndWhile

See Also