Difference between revisions of "FormList Script"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Karlitos
(Updated examples url)
imported>CraftySentinel
m (→‎Member Functions: Reverted to List)
Line 18: Line 18:
== Member Functions ==
== Member Functions ==


{|class="wikitable" width =100%
:'''[[AddForm - FormList|AddForm]](Form ''apForm'')'''
!style="text-align:left;"|Function
:*Adds the given form to the form list.
!style="text-align:left;"|Description
|-
|[[AddForm - FormList|'''AddForm'''(Form ''apForm'')]]
|Adds the given form to the form list.
|-


|[[Find - FormList|Int '''Find'''(Form ''apForm'')]]
:'''Int [[Find - FormList|Find]](Form ''apForm'')'''
|Finds the specified form in the form list and returns its index or returns -1 if it's not a member.
:*Finds the specified form in the form list and returns its index or returns -1 if it's not a member.
|-


|[[GetAt - FormList|Form '''GetAt'''(Int ''aiIndex'')]]
:'''Form [[GetAt - FormList|GetAt]](Int ''aiIndex'')'''
|Returns the form in the list at index ''aiIndex''.
:*Returns the form in the list at index ''aiIndex''.
|-


|[[GetSize - FormList|Int '''GetSize'''()]]
:'''Int [[GetSize - FormList|GetSize]]()'''
|Returns the number of forms in the form list.
:*Returns the number of forms in the form list.
|-


|[[HasForm - FormList|Bool '''HasForm'''(Form ''akForm'')]]
:'''Bool [[HasForm - FormList|HasForm]](Form ''akForm'')'''
|Returns whether the passed-in form is in this form list.
:*Returns whether the passed-in form is in this form list.
|-


|[[RemoveAddedForm - FormList|'''RemoveAddedForm'''(Form ''apForm'')]]
:'''[[RemoveAddedForm - FormList|RemoveAddedForm]](Form ''apForm'')'''
|Removes the given added form from the form list.
:*Removes the given added form from the form list.
|-


|[[Revert - FormList|'''Revert'''()]]
:'''[[Revert - FormList|Revert]]()'''
|Removes all script added forms from the form list.
:*Removes all script added forms from the form list.
|-
 
|}


== Events ==
== Events ==

Revision as of 07:31, 2 February 2014


Native base script for Formlists in the game.

Definition

ScriptName FormList extends Form

Properties

None

Global Functions

None

Member Functions

AddForm(Form apForm)
  • Adds the given form to the form list.
Int Find(Form apForm)
  • Finds the specified form in the form list and returns its index or returns -1 if it's not a member.
Form GetAt(Int aiIndex)
  • Returns the form in the list at index aiIndex.
Int GetSize()
  • Returns the number of forms in the form list.
Bool HasForm(Form akForm)
  • Returns whether the passed-in form is in this form list.
RemoveAddedForm(Form apForm)
  • Removes the given added form from the form list.
Revert()
  • Removes all script added forms from the form list.

Events

None

Example Scripts

Cycle Through a List of Objects and Perform an Action on Each Object(FormLists)

Show Gift Inventory and Identify Items Given