- Joined
- Jun 27, 2010
- Messages
- 4,183
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?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
native IssueTargetOrderById takes unit whichUnit, integer order, widget targetWidget returns booleannative IssuePointOrderById takes unit whichUnit, integer order, real x, real y returns boolean
native IssueImmediateOrderById takes unit whichUnit, integer order returns boolean
Custom script: native IssueTargetOrderById takes unit udg_Dummy1, ACsi, widget targetWidget returns boolean
like this?
Custom script: native IssueTargetOrderById takes unit udg_Dummy1, ACsi, widget targetWidget returns boolean
Custom script: call IssueTargetOrderById( udg_Dummy1, 'ACsi', udg_TargetUnit)
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
Actions

Set Temp_Unit = Dummy Unit

Set Temp_Point = (Target point of ability being cast)

Set x = (X of Temp_Point)

Set y = (Y of Temp_Point)

Custom script: call IssuePointOrderById(udg_Temp_Unit, 'ACsi', udg_x, udg_y)

Custom script: call RemoveLocation(udg_Temp_Point)
852592. You can view a list of them here: Order Ids)call IssuePointOrder(udg_Temp_Unit, "silence", udg_x, udg_y)
Custom script: call IssuePointOrderById(udg_Dummy1, 852592, udg_x, udg_y)