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

Current Order of Unit

Status
Not open for further replies.
Level 4
Joined
Dec 15, 2007
Messages
96
A short question here, How do I detect if the unit is standing still or moving?

I've tried obvious things such as Current order of unit equal to Order Stop, and stand/Move, and Right-Click. None of these worked>.<
(Condition of a trigger btw)

Any ideas?
 
Level 4
Joined
Dec 15, 2007
Messages
96
Not really what I was after.. was gonna make a simple trigger that kills units near a unit if the unit is moving. Here's what I got now.

  • Events
    • Unit - A unit comes within 150.00 of Battle Tank 0087 <gen>
  • Conditions
    • (Unit-type of (Triggering unit)) Equal to Bloody Villager
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Or - Any (Conditions) are true
          • Conditions
            • (Current order of Battle Tank 0087 <gen>) Equal to (Order(right-click))
            • (Current order of Battle Tank 0087 <gen>) Not equal to (Order(stop))
      • Then - Actions
        • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Objects\Spawnmodels\Human\HumanBlood\HumanBloodPeasant.mdl
        • Unit - Explode (Triggering unit)
      • Else - Actions
        • Unit - Order (Triggering unit) to Right-Click Battle Tank 0087 <gen>
That condition I want changed so it doesnt trigger if the Battle Tank is standing still, but only when its moving. Can this be done in a simple way, without any Jass?
 
It's called "smart", not "right-click".
Anyway, heres how it's done:
  • Untitled Trigger 001
    • Events
      • Unit - A unit comes within 150.00 of Siege Engine 0000 <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Current order of (Triggering unit)) Not equal to (Order(<Empty String>))
              • (Current order of (Triggering unit)) Equal to (Order(smart))
        • Then - Actions
          • Unit - Explode (Triggering unit)
        • Else - Actions
          • Unit - Order (Triggering unit) to Right-Click Siege Engine 0000 <gen>
For the <Empty String>, just set the value to nothing. Because if the unit is standing, it won't have the "stop" order.
 
Status
Not open for further replies.
Top