Background for Fallout 4
Member of the ObjectReference script
Form[]functionGetInventoryItems()Native

Description

Wiki Description

Returns an array of all items held by this container

Documentation Comment

Returns all the base forms from the inventory


Caveats


Examples

Function DumpCurrentPlayerInventory()
    Debug.Trace("Begin player inventory dump")
    Actor PlayerRef = Game.GetPlayer()
    Form[] InventoryForms = PlayerRef.GetInventoryItems()
    int i = 0
    int iCount = InventoryForms.Length
    while ( i < iCount )
        Debug.Trace("Qty: " + PlayerRef.GetItemCount(InventoryForms[i]) + "Form: " + InventoryForms[i])
        i += 1
    endwhile
EndFunction

Auto-Generated Example

Form[] returnedValue = myObjectReference__toCallFunctionOn.GetInventoryItems()

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.