Issued Order Target a/With no target - Order unit to do "string"?

Sartan

New Member
Reaction score
23
Can you order a unit to do the order stored in a string variable in beforehand?
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
I believe it is possible, by doing something like this:
JASS:
function PointOrder takes unit WhichUnit, string WhatOrder, location Where returns nothing
    call IssuePointOrderLoc (WhichUnit, WhatOrder, Where)
endfunction


function UnitOrder takes unit WhichUnit, string WhatOrder, unit Target returns nothing
    call IssueTargetOrder (WhichUnit, WhatOrder, Target)
endfunction


function InstantOrder takes unit WhichUnit, string WhatOrder returns nothing
    call IssueImmediateOrder (WhichUnit, WhatOrder)
endfunction
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Yes but not with GUI.
Here is the GUI to Jass translation for the "issue order with no target" action:
Code:
call IssueImmediateOrderBJ( GetTriggerUnit(), "stop" )
instead of "stop" you insert udg_myStringVariable, for example, like this:
Code:
set myStringVariable = "stop"
call IssueImmediateOrderBJ( GetTriggerUnit(), udg_myStringVariable )
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top