Table of Contents

Method ActionUseItem

Namespace
Anvil.API
Assembly
NWN.Anvil.dll

ActionUseItem(NwItem, ItemProperty, Location, bool, int)

Instructs this creature to use the specified item property of an item in their inventory.

public Task ActionUseItem(NwItem item, ItemProperty itemProperty, Location location, bool decrementCharges = true, int subPropertyIndex = 0)

Parameters

item NwItem

The item to use.

itemProperty ItemProperty

The item property on the item to use.

location Location

The target location for the item property action.

decrementCharges bool

If true, decrements item charges as configured for the item property action.

subPropertyIndex int

Specifies the index to use if this item has sub-properties (such as sub-radial spells).

Returns

Task

ActionUseItem(NwItem, ItemProperty, NwGameObject, bool, int)

Instructs this creature to use the specified item property of an item in their inventory.

public Task ActionUseItem(NwItem item, ItemProperty itemProperty, NwGameObject gameObject, bool decrementCharges = true, int subPropertyIndex = 0)

Parameters

item NwItem

The item to use.

itemProperty ItemProperty

The item property on the item to use.

gameObject NwGameObject

The target object for the item property action.

decrementCharges bool

If true, decrements item charges as configured for the item property action.

subPropertyIndex int

Specifies the index to use if this item has sub-properties (such as sub-radial spells).

Returns

Task