• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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