GetInventoryObject

From the Fallout3 GECK Wiki
Revision as of 22:31, 31 January 2013 by imported>WarMachineDD7
Jump to navigation Jump to search
< [[::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

[help]
(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 such item type in the player's inventory.

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.