Difference between revisions of "AddForm - FormList"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>DavidJCobb
(→‎Notes: no dupes)
imported>DavidJCobb
(→‎Notes: created refs aren't made persistent by membership in form lists!)
Line 25: Line 25:
* This function adds the new form at the 0th index, adding 1 to the indices of the other list entries.
* This function adds the new form at the 0th index, adding 1 to the indices of the other list entries.
* FormLists cannot contain duplicate entries. Using AddForm(...) with a form that is already in the list will not add a second copy to the list.
* FormLists cannot contain duplicate entries. Using AddForm(...) with a form that is already in the list will not add a second copy to the list.
* A created reference does not become persistent by virtue of being added to a FormList. If you try to retrieve the reference from the FormList when it is not loaded and not persistent, you will get an incorrect result or no result.


== See Also ==
== See Also ==

Revision as of 01:46, 4 October 2016

Member of: FormList Script

Adds the given form to the form list.

Syntax

Function AddForm(Form apForm) native

Parameters

  • apForm: Form to add to the list, if apForm == None this function seems to have no effect

Return Value

None

Examples

; Adds the diamond to the gem list
GemList.AddForm(Diamond)

Notes

  • This function adds the new form at the 0th index, adding 1 to the indices of the other list entries.
  • FormLists cannot contain duplicate entries. Using AddForm(...) with a form that is already in the list will not add a second copy to the list.
  • A created reference does not become persistent by virtue of being added to a FormList. If you try to retrieve the reference from the FormList when it is not loaded and not persistent, you will get an incorrect result or no result.

See Also