UnitUseItemPoint

Parameters
whichUnit unit

Target unit.

whichItem item

Handle to item instance.

x real

Point at X map coordinate to use the item.

y real

Point at Y map coordinate to use the item.

bug

Seems to always return false (tested v1.32.10).

comment

Issues an immediate order for the unit to use item pointed at position (x,y).

This is the same as left-clicking and using an item in inventory. Units that cannot use items will not do anything.

Examples:

  • Potion of Healing 'phea': Restores HP

  • Dagger of Escape 'desc': Casts immediately towards (x,y), even if too far, item on cooldown. Does not cast if position is already reached (no cooldown).

  • Inferno Stone 'infs': runs towards (x,y) and once in range, casts to spawn an Infernal. If already in range, casts immediately.

note

See: UnitUseItem, UnitUseItemTarget.

patch

1.00

return type
boolean
Source code
native          UnitUseItemPoint        takes unit whichUnit, item whichItem, real x, real y returns boolean
Source
common.j
wc3modding.com
UnitUseItemPoint