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

Player Detection

Status
Not open for further replies.
Level 7
Joined
Feb 23, 2020
Messages
253
Hello, i have a question about this trigger, it works perfectly BUT i want it to work for except one unit(Which is not playing, Light blue). Its for a castle defense, and i dont want the castle itself to be removed, which is owned by Light Blue.

  • Player Detection
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • For each (Integer PlayerDetection_INT) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player(PlayerDetection_INT)) slot status) Not equal to Is playing
            • Then - Actions
              • Set VariableSet PlayerDetection_Group = (Units owned by (Player(PlayerDetection_INT)).)
              • Unit Group - Pick every unit in PlayerDetection_Group and do (Actions)
                • Loop - Actions
                  • Set VariableSet PlayerDetection_Unit = (Picked unit)
                  • Unit - Remove PlayerDetection_Unit from the game
                  • Custom script: set udg_PlayerDetection_Unit = null
              • Custom script: call DestroyGroup( udg_PlayerDetection_Group )
            • Else - Actions
 
Status
Not open for further replies.
Top