GetAllItemRefs

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Returns an array_var containing Inventory References of all the items in the calling reference's inventory.

Four optional parameters may be passed for filtering the result:

typeCode - Only include inventory references of items of this type (type-codes). Passing 0 will include items of ANY type.

noNonPlayable - Do not include items that are non-playable (only applicable to clothing, weapons and ammo).

noQuestItems - Do not include quest items.

noEquipped - Do not include inventory references that are currently equipped by the calling reference.

Syntax

[help]
(items:array_var) reference.GetAllItemRefs typeCode:int noNonPlayable:0/1 noQuestItems:0/1 noEquipped:0/1

Example

let aItems := objectRef.GetAllItemRefs

The returned array will include inventory references of ALL the items in the calling reference's inventory.

let aItems := objectRef.GetAllItemRefs 40 1 0 1

The returned array will include inventory references of all the weapon-type items in the calling reference's inventory, excluding references that are equipped, or of non-playable weapons.

Notes

  • The size of this array is not necessarily the total amount of items the player has, as some item refs with identical health can be stacked. Only one representative ref is returned for a stack of item refs - use GetRefCount to check for this.

See Also