• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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