HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to order an unit to use an item

07-27-2009, 01:55 AM#1
blanc_dummy
i've try these

Collapse JASS:
call IssueImmediateOrderById( U, 852008 )
call IssueImmediateOrderById( U, 852009 )
call IssueImmediateOrderById( U, 852010 )
call IssueImmediateOrderById( U, 852011 )
call IssueImmediateOrderById( U, 852012 )
call IssueImmediateOrderById( U, 852013 )

But nothing happens
07-27-2009, 02:41 AM#2
moyack
it depends of the item, if it has a target order ability, then you have to use an IssueTargetOrderById, if it has a point target ability, then IssuePointTargetById.

Other possibility (if you have the items variables) is to use these commands:

Collapse JASS:
native          UnitUseItem             takes unit whichUnit, item whichItem returns boolean
native          UnitUseItemPoint        takes unit whichUnit, item whichItem, real x, real y returns boolean
native          UnitUseItemTarget       takes unit whichUnit, item whichItem, widget target returns boolean
07-27-2009, 04:09 AM#3
blanc_dummy
It works...thanks