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

remove unit of a player

Status
Not open for further replies.
Level 19
Joined
Sep 4, 2007
Messages
2,826
Basically what you want is that all units who don't have a playing player will be removed from the game. This can be done in multiple ways. This system can be called via a code.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • ((Player((Integer A))) slot status) Equal to Is unused
          • ((Player((Integer A))) slot status) Equal to Has left the game
    • Then - Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units owned by (Player((Integer A)))) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
    • Else - Actions
 
Status
Not open for further replies.
Top