Difference between revisions of "PickOneOf"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Odessa
(Created page with "{{Function |origin = NVSE |summary = Called on a reference, returns one random item from the intersection subset of items that are contained both in their inventory and the...")
 
imported>Odessa
m (some more see also)
 
Line 18: Line 18:
==See Also==
==See Also==
*[[GetInventoryObject]]
*[[GetInventoryObject]]
*[[ListGetNthForm]]
*[[Rand]]
*[[Rand]]
*[[GetItemCount]]
*[[IsRefInList]]
*[[IsRefInList]]
*[[ListGetFormIndex]]
*[[ListGetFormIndex]]
*[[IsInList]]
[[Category:Functions_(NVSE)]]
[[Category:Functions_(NVSE)]]

Latest revision as of 06:50, 15 July 2014

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

A function added by the New Vegas Script Extender.

Description

Called on a reference, returns one random item from the intersection subset of items that are contained both in their inventory and the specified form list. Returns 0 if no items are common to both.

Syntax

[help]
(form) actor.PickOneOf Intersection:formlist

Example

; SunnyREF inventory contains: Beer, Jet, Knife
; MyFormList contains: Beer, Jet, GeckoSteak

SunnyREF.PickOneOf MyFormList ; returns either Beer or Jet, at random

See Also