1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

How to detect idle unit

Discussion in 'World Editor Help Zone' started by Strydhaizer, Aug 25, 2019.

  1. Strydhaizer

    Strydhaizer

    Joined:
    Feb 28, 2013
    Messages:
    1,524
    Resources:
    4
    Models:
    1
    Maps:
    1
    Template:
    2
    Resources:
    4
    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
     
  2. Ceday

    Ceday

    Joined:
    Feb 22, 2010
    Messages:
    1,102
    Resources:
    0
    Resources:
    0
    Not tested myself, but instead of stop try empty string.
     
  3. Warseeker

    Warseeker

    Joined:
    Feb 18, 2014
    Messages:
    2,654
    Resources:
    1
    Maps:
    1
    Resources:
    1
    The correct order that you are looking for is "stand down" not "stop".
     
  4. Strydhaizer

    Strydhaizer

    Joined:
    Feb 28, 2013
    Messages:
    1,524
    Resources:
    4
    Models:
    1
    Maps:
    1
    Template:
    2
    Resources:
    4
    "order(stand down)" works, thanks for the help!