GetInventoryObject

Revision as of 22:17, 31 January 2013 by imported>WarMachineDD7 (Created page with "{{Function |origin = FOSE1 |summary = Returns the base form of the nth form in a container. |name = GetInventoryObject |alias = GetNthObject |returnType = ref |reference...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
< [[::Category:Functions|Category:Functions]]

A function added by the Fallout Script Extender.

Description

Returns the base form of the nth form in a container.

Syntax

(ref) ContainerRefID.GetInventoryObject index:int 

Or:

(ref) ContainerRefID.GetNthObject index:int

Example

ref itemType
int ammountOfItems

set itemType to player.GetInventoryObject 5
set ammountOfItems to player.GetItemCount itemType

This script will get the type of the 5th form in the player's inventory and then get the quantity of them.

Notes

  • The container's index starts at 1.
  • Multiple instances of the same base form in a container are considered as just one item by the function.