Difference between revisions of "GetInventoryObject"
Jump to navigation
Jump to search
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...") |
imported>WarMachineDD7 |
||
Line 16: | Line 16: | ||
set itemType to player.GetInventoryObject 5 | set itemType to player.GetInventoryObject 5 | ||
set ammountOfItems to player.GetItemCount itemType | 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 | 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== | ==Notes== |
Revision as of 22:31, 31 January 2013
< [[::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 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.