PickFromList

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Returns the first form in the calling reference's inventory that is in the passed list.

Syntax

[help]
(form) [ref].PickFromList list:form SearchStartPos:int SearchHowMany:int 

Example

Player.PickFromList GunsList

Will return the first form from the list that is found in the Player's inventory. Returns 0 if none of the forms is found in the Player's inventory

Player.PickFromList GunsList 5

Will start the search from index 5 of the list (default is 0), skipping the first five forms (indexes 0,1,2,3,4).

Player.PickFromList GunsList 5 5

Will search five forms starting from index 5 of the list (indexes 5,6,7,8,9).