• 🏆 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!

[Solved] Order Unit Problem...

Status
Not open for further replies.
Level 5
Joined
Jan 17, 2014
Messages
131
Hi, I have a little problem. What I want to do is store a unit order into a variable so I can order the unit to do my custom sh*t, and then to re-order it to do whatever it was doing. In short, my question is: How do I use a stored order?

P.S. I can only use GUI
 
Well pure GUI can't do that.
To use saved Orders you need to use the Custom script function and have to save which Ordertype it was ( No target, Ground, Unit ,...).

Then you use one of this.
  • Custom script: call IssueTargetOrderBJ( udg_Unit, udg_Order, udg_Target )
  • Custom script: call IssuePointOrderLocBJ( udg_Unit, udg_Order, udg_Loc )
  • Custom script: call IssueImmediateOrderBJ( udg_Unit, udg_Order )
  • Custom script: call IssueTargetDestructableOrder( udg_Unit, udg_Order, udg_Tree )
  • Custom script: call IssueTargetItemOrder( udg_Unit, udg_Order, udg_Item )
  • Custom script: call IssueTrainOrderByIdBJ( udg_Unit, udg_Order )
Could Look like this.
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • OrderType = OrderType_Loc
    • Then - Actions
      • -------- Loc is the Position which was last Ordered --------
      • Custom script: call IssuePointOrderLocBJ( udg_Unit, udg_Order, udg_Loc )
    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • OrderType = OrderType_Unit
        • Then - Actions
          • Custom script: call IssueTargetOrderBJ( udg_Unit, udg_Order, udg_Target )
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • OrderType = OrderType_No_Target
            • Then - Actions
              • Custom script: call IssueImmediateOrderBJ( udg_Unit, udg_Order )
            • Else - Actions
PS: OrderType is in this example an Integer
 
Last edited:
Level 5
Joined
Jan 17, 2014
Messages
131
Yeah, you see I tried that. Result: 1 compile error, Invalid Argument Type.

Here is my trigger:
  • call IssueTargetOrderBJ( udg_unit[udg_integer], udg_order[udg_integer], udg_object3[udg_integer] )
unit is a unit array variable
object3 is a unit array variable
order is an order array variable
 
Last edited:
Status
Not open for further replies.
Top