PickOneOf

From GECK
Jump to: navigation, search


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