• 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.

Removing (random player from)

Status
Not open for further replies.
Level 28
Joined
Jan 26, 2007
Messages
4,789
Do not use color codes in normal text, they just hurt my eyesight!
Color codes are for exceptional cases only (when you want to point something out, for example).
Thank you.

Perhaps something like this might help?

  • Actions
    • Set TempInt = 0
    • For each (Integer i) from 1 to 10, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Player(i)) is an ally of (Picked player)) Equal to True
          • Then - Actions
            • Set Group = (Units owned by (Player(i)))
            • Set TempInt = (TempInt + (Number of units in Group))
            • Custom script: call DestroyGroup(udg_Group)
          • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • TempInt Equal to 0
      • Then - Actions
        • Do - Actions
      • Else - Actions
        • Do - Actions
This should go through all players and check whether he/she is an ally of the picked player (with the player group you've selected before),
if the total amount is 0, then (your actions here), else (else actions here)
 
Status
Not open for further replies.
Top