• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

OrderById

Status
Not open for further replies.
Level 13
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