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

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