Is Unit In Unit Group?

danpe

New Member
Reaction score
5
Hey,

I made like an arena and it takes 2 teams and put them inside the arena..
How can i know which team has won, if i dont know how much players in each team?

like in free for all i used:

Trigger:
  • Wait until ((Number of units in (Units in Arena <gen> matching (((Matching unit) is A Hero) Equal to True))) Equal to 1), checking every 1.00 seconds
 

Conal

Member
Reaction score
12
A unit dies
unit type of triggering unit equal to hero

set temp_group = units in arena <gen> matching (matching unit) is an ally of owner of triggering unit equal to true
if number of units in temp_group equal to 0
then (you win)
else do nothing
call DestroyGroup(udg_temp_group)
 

danpe

New Member
Reaction score
5
How can i know which team won?

Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Random unit from (Units in Arena &lt;gen&gt; matching (((Matching unit) is A Hero) Equal to True)))) Equal to Player 1 (Red)
          • (Owner of (Random unit from (Units in Arena &lt;gen&gt; matching (((Matching unit) is A Hero) Equal to True)))) Equal to Player 2 (Blue)
          • (Owner of (Random unit from (Units in Arena &lt;gen&gt; matching (((Matching unit) is A Hero) Equal to True)))) Equal to Player 3 (Teal)
          • (Owner of (Random unit from (Units in Arena &lt;gen&gt; matching (((Matching unit) is A Hero) Equal to True)))) Equal to Player 4 (Purple)
    • Then - Actions
      • Game - Display to (All players) the text: (Upper side Team + has won !)
    • Else - Actions
      • Game - Display to (All players) the text: (Lower side Team + has won !)


is it good?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top