Difference between revisions of "ListAddReference"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Geckbot
m (Robot: Automated text replacement (-\[\[Category:(.*?)Functions \(GECK 1.0\)\]\] +Category:\1Functions (FOSE)))
imported>Prideslayer
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function
{{Function
  |origin = FOSE1
  |origin = FOSE1
  |summary = Adds a reference to a [[FormList]] with the option to specify an index. If no index is specified, the form is added at the end of the list (with the highest index). This differs from [[AddFormToFormList]]. The function returns the index at which the form was successfully added.
  |summary = Adds the calling reference at the given index (or at the end if not provided)
  |name = ListAddReference
  |name = ListAddReference
  |returnVal = addedAtIndex
  |alias = ListAddRef
  |returnType = int
  |returnType = int
  |referenceType = [Object]
  |referenceType = ref
  |arguments =  
  |arguments =  
   {{FunctionArgument
   {{FunctionArgument
   |Name = FormListID
   |Name = form list
   |Type = ref
   |Type = ref
   }}{{FunctionArgument
   }}{{FunctionArgument
   |Name = index
   |Name = index
   |Type = int
   |Type = int
   |Optional = y
   |Optional = optional
   }}
   }}
|example = myForm.ListAddReference myFormList
yourForm.ListAddReference yourFormList 4
}}
}}
 
Note that forms added to a list with this function will not persist across savegames.  If you need to add items to a list that will be preserved in a saved game, use [[AddFormToFormList]]
==Notes==
[[Category:Functions_(FOSE)]]
*If you wish to add a base object form to a [[FormList]], use [[ListAddForm]].
*This function differs from [[AddFormToFormList]] in the way that forms are added to a [[FormList]] when no index is given.
 
==See Also==
*[[ListAddForm]]
*[[ListRemoveForm]]
*[[ListRemoveNthForm]]
*[[ListReplaceForm]]
*[[ListReplaceNthForm]]
*[[ListGetNthForm]]
*[[ListGetFormIndex]]
*[[ListGetCount]]
*[[AddFormToFormList]]
*[[IsInList]]
*[[IsWeaponInList]]
 
[[Category:List Functions]]
[[Category:List Functions]]
[[Category:List Functions (FOSE)]]
[[Category:Functions]]
[[Category:Functions (FOSE)]]

Latest revision as of 10:01, 18 August 2012

< [[::Category:Functions|Category:Functions]]

A function added by the Fallout Script Extender.

Description

Adds the calling reference at the given index (or at the end if not provided)

Syntax

[help]
(int) ref.ListAddReference form list:ref index:int 

Or:

(int) ref.ListAddRef form list:ref index:int

Note that forms added to a list with this function will not persist across savegames. If you need to add items to a list that will be preserved in a saved game, use AddFormToFormList