• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Simple GUI Trigger

Status
Not open for further replies.
Level 24
Joined
Aug 1, 2013
Messages
4,657
WUT???

I somehow want to know how this actually works.

I have these triggers:
  • Untitled Trigger 002
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Game - Display to (All players) the text: (Unit = + (Name of (Triggering unit)))
      • Unit - Pause (Triggering unit)
      • Unit - Order (Triggering unit) to Stop
      • Unit - Unpause (Triggering unit)
      • Trigger - Turn on (This trigger)
  • Untitled Trigger 002 Copy
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • Game - Display to (All players) the text: point order given
  • Untitled Trigger 002 Copy Copy
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • Game - Display to (All players) the text: order given
In this case I get:
Unit = Paladin
point order given
point order given
order given

When I remove turn off and on, I get:
Unit = Paladin
Unit = Paladin
order given
point order given
order given
point order given

When I remove pause and unpause too, I get:
Unit = Paladin
order given
point order given

So this means that the plain one is giving the order, reorder him to stop but then the order gets overwritten.

When adding pause and unpause, the order is removed but re-added to the unit. This means that the unit will be re-ordered to move to the location where I wanted him to move to after I ordered him to stop.
Then he gets stopped again because he gets that order and then that order is overwritten again.

When adding turn off and on, the order is immediately given and re-ordered and then that unit gets ordered to stop.

I wonder how the code of ordering units works in WC3.

EDIT: Looks like the current order is regiven... that is weird.
 
Level 14
Joined
Oct 16, 2011
Messages
296
Did you test it?

When I test this the unit is still walking:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • Game - Display to (All players) the text: ((Name of (Triggering unit)) + ('s current order is + (String((Current order of (Triggering unit))))))
      • Unit - Pause (Triggering unit)
      • Unit - Order (Triggering unit) to Stop
      • Unit - Unpause (Triggering unit)
What? When I tested this, the unit immediately stopped.
Why? Curse you World Editor!
 
Status
Not open for further replies.
Top