• 🏆 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!

How to detect idle unit

Status
Not open for further replies.
Hello guys, I would like to ask how do you get all idle units?

Tried this and did'nt work. I even tried to invert the condition (/= Order(move) || /= Order(smart) || /= Order(holdposition)) but also didn't work.

I will really appreciate a help. :)

- Please don't mind the part where I pick all units in the map, it's only being tested the test map for now.

  • get idle unit
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Current order of (Picked unit)) Equal to (Order(stop))
            • Then - Actions
              • Game - Display to (All players) the text: someone is idle!
              • Unit - Kill (Picked unit)
            • Else - Actions
              • Do nothing
 
Status
Not open for further replies.
Top