UnitUseItemPoint
- Parameters
whichUnit unitTarget unit.
whichItem itemHandle to item instance.
x realPoint at X map coordinate to use the item.
y realPoint at Y map coordinate to use the item.
- 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.
-
- bug
Seems to always return false (tested v1.32.10).
- note
See:
UnitUseItem,UnitUseItemTarget.- patch
1.00
- Source
- common.j (raise an issue to discuss on Github or submit a PR)
- return type
boolean- Source code
native UnitUseItemPoint takes unit whichUnit, item whichItem, real x, real y returns boolean