Difference between revisions of "ListGetFormIndex"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Geckbot
m (Robot: Automated text replacement (-\[\[Category:(.*?)Functions\]\] +Category:\1Functions\nCategory:\1Functions (GECK 1.0)))
imported>Odessa
(Clarified)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Function
{{Function
  |origin = FOSE1
  |origin = FOSE1
  |summary = Returns the index of a form in a [[FormList]].
  |summary = Returns the index for the specified form if it is found exactly in the specified form list, otherwise returns constant -1 (not found).
  |name = ListGetFormIndex
  |name = ListGetFormIndex
|returnVal = index
  |returnType = int
  |returnType = int
  |arguments =
  |arguments =  
   {{FunctionArgument
   {{FunctionArgument
   |Name = FormListID
   |Name = formlist
   |Type = ref
   |Type = ref
   }}{{FunctionArgument
   }}{{FunctionArgument
   |Name = FormID
   |Name = form
   |Type = ref
   |Type = ref
   }}
   }}
|example = ListGetFormIndex myFormList myForm
}}
}}
 
==Example==
<pre>
int iIndex
set iIndex to ListGetFormIndex GoodspringersList, SunnyREF
</pre>
==Notes==
==Notes==
*See [[ListGetNthForm]] to get the form at a specified index.
*The first form in the list is at index 0, and the last is equal to ([[ListGetCount|ListGetCount - 1]]).
 
==See Also==
==See Also==
*[[ListAddForm]]
*[[IsInList]] (Checks for base objects only)
*[[ListAddReference]]
*[[IsRefInList]] (Indexes both exact and base/leveled matches)
*[[ListRemoveForm]]
*[[ListRemoveNthForm]]
*[[ListReplaceForm]]
*[[ListReplaceNthForm]]
*[[ListGetNthForm]]
*[[ListGetCount]]
*[[ListGetCount]]
*[[AddFormToFormList]]
[[Category:Functions_(FOSE)]] [[Category:List_Functions]]
*[[IsInList]]
*[[IsWeaponInList]]
 
[[Category:List Functions]]
[[Category:List Functions (GECK 1.0)]]
[[Category:Functions]]
[[Category:Functions (GECK 1.0)]]

Latest revision as of 19:08, 1 July 2014

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

A function added by the Fallout Script Extender.

Description

Returns the index for the specified form if it is found exactly in the specified form list, otherwise returns constant -1 (not found).

Syntax

[help]
(int) ListGetFormIndex formlist:ref form:ref

Example

int iIndex
set iIndex to ListGetFormIndex GoodspringersList, SunnyREF

Notes

  • The first form in the list is at index 0, and the last is equal to (ListGetCount - 1).

See Also