• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

OrderById

Status
Not open for further replies.
Level 14
Joined
Mar 4, 2009
Messages
1,156
i need help with some custom scripts,i need to order some unit to do something trough OrderID ( i think only OrderId supports functions like "(GetIssuedOrderId()))" ,so that some other unit can do the same order as triggering unit (btw i saw that this cant be done with normal GUI actions for orders and i think it sucks)

i found this ...

-no target
call IssueImmediateOrderById( SomeUnit, (GetIssuedOrderId()))
-unit target
call IssueTargetOrderById( SomeUnit, (GetIssuedOrderId()), TargetOrderUnit )

-for that i just replaced "BJ" with "ById" and that was it..but it cant work for locations etc..

but i cant find how to do it for

-point order
-target destructible order
-target item order

xD

i want so if some unit is ordered to do something,than SomeUnit does the same order

EDIT:
Pharaoh + rep again :xxd:
SOLVED:

-no target
call IssueImmediateOrderById( YourUnit, (GetIssuedOrderId()))
-target point order
Set POINT = (Target point of issued order)
Custom script: call IssuePointOrderByIdLoc ( YourUnit, (GetIssuedOrderId()), udg_POINT)
Custom script: call RemoveLocation(udg_POINT)
-target object order
>target unit order
Custom script: call IssueTargetOrderById( YourUnit, (GetIssuedOrderId()), ( GetOrderTargetUnit()))
>target item order
Custom script: call IssueTargetOrderById( YourUnit, (GetIssuedOrderId()), GetOrderTargetItem() )
>target destructible
Custom script: call IssueTargetOrderById( YourUnit, (GetIssuedOrderId()), GetOrderTargetDestructable() )
 
Last edited:
TargetOrderById can accept destructibles and items too.
Point equivalent is:
  • Custom script: call IssuePointOrderById (unit, orderid, x, y)
The above is more helpful, even if you work with locations (And not X of location or Y of location), it can still be done both ways:
  • Set Point1 = (Target point of issued order)
  • Custom script: call IssuePointOrderById (GetLastCreatedUnit(), orderid, GetLocationX (udg_Point1), GetLocationY (udg_Point1))
  • Custom script: call RemoveLocation (udg_Point1)
or
  • Set Point1 = (Targtet point of issued order)
  • Custom script: call IssuePointOrderByIdLoc (GetLastCreatedUnit(), orderid, udg_Point1)
  • Custom script: call RemoveLocation (udg_Point1)
It's the same, although the one that uses x and y parameters functions faster.
 
Status
Not open for further replies.
Top