• 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.

[Trigger] Interesting discovery

Status
Not open for further replies.
Level 4
Joined
Jul 23, 2007
Messages
129
Hey, I discovered something yesterday that may be of interest to you guys. Notice the matching condition in the below trigger.

  • Check a unit's current order
    • Events
      • (whatever you want it to be)
    • Conditions
      • (again, your choice)
    • Actions
      • Unit Group - Pick every unit in (whatever region) matching (((Current order of (Matching unit)) Equal to (Order(stop))) and do (Actions)
        • Loop - Actions
          • (whatever actions)
You can pick orders such as stop, smart, move, and so on. Then your trigger will only affect units in the specified region that are currently performing that specific action.

What if your unit is doing nothing at all (standing still without having been given a 'stop' command)? This unit will be ignored by the trigger if you use 'stop' in the above condition, because even though it has stopped, is not actually being ordered to stop.

So, how do you get this condition to target such units?

When entering the unit order in the string box, just input a single space. This will cause the trigger to grab units who are doing nothing without having been ordered to stop!

Like this

  • Check a unit's current order
    • Events
      • (whatever you want it to be)
    • Conditions
      • (again, your choice)
    • Actions
      • Unit Group - Pick every unit in (whatever region) matching (((Current order of (Matching unit)) Equal to (Order( ))) and do (Actions)
        • Loop - Actions
          • (whatever actions)
I hope this is helpful to you guys. This may be useful in AOS type maps to help unstick units that stop moving because they were stunned or something like that.
 
Yah, but its kinda strange. If the unit moves/attacks on its own accord without a specific order from a player or trigger, its current order is always <empty string>, but if you right click then its current order is smart. Most orders like stop in this case are pretty much useless because stop just resets the unit to <empty string>.

I hope my clarification helps some people.
 
Level 12
Joined
Aug 10, 2004
Messages
1,141
Boolean Conditions are the best ones...
Detect Buffs
Detect if unit is ally or enemy....

They are the best...
 
Level 12
Joined
Aug 10, 2004
Messages
1,141
For your information, units who are standing still and doing nothing (not stopping, not standing guard) are carrying out the 'idle' command, so their current order is 'idle'.
Looks like ' ' is equal to 'idle'

How did you figure that oot?
I've never seen commands for it...
 
Level 12
Joined
Aug 10, 2004
Messages
1,141
Trial and error. But actually you can make a trigger that writes the unit's current order to the screen. I believe you can convert the unitorderid (integer) to ordrerstring, but I didn't need it so far so I haven't tried it yet.

Good Call...
ANd I get the feeling that Seeing the current order of a unit might be kinda awesome...
 
Status
Not open for further replies.
Top