- Joined
- Jun 27, 2010
- Messages
- 2,707
Is there a way to order a unit to cast a spell by ID? Because the spells in <order unit targeting a unit> are very limited. And I question myself, what do I do now?
native IssueTargetOrderById takes unit whichUnit, integer order, widget targetWidget returns boolean
native IssuePointOrderById takes unit whichUnit, integer order, real x, real y returns boolean
native IssueImmediateOrderById takes unit whichUnit, integer order returns boolean
like this?
- Custom script: native IssueTargetOrderById takes unit udg_Dummy1, ACsi, widget targetWidget returns boolean
The Ids you use for the above are the Ability Ids. You are thinking of the spell order ids which are strings.
attack / stop / smart / hold and the others are based off of integers.
native IssuePointOrderById takes unit whichUnit, integer order, real x, real y returns boolean
852592
. You can view a list of them here: Order Ids)call IssuePointOrder(udg_Temp_Unit, "silence", udg_x, udg_y)