If all players own a hero condition, question

tachiKC

New Member
Reaction score
3
I am trying to make it so that if every player in the game owns a hero, then the ability Select Unit is removed from the hero tavern.

So basically a trigger like this:

IF all players own a hero
THEN Remove Select Unit ability from Hero Tavern



I just need the condition. I thought it would be under an integer condition, but so far I am not seeing what I would like.

Thanks for any help.
 
S

Scroller

Guest
Try this:
Code:
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Picked unit) is A Hero) Equal to True)) and do (Actions)
    Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in (Last created unit group))) Equal to (Number of players in (All players controlled by a User player))
            Then - Actions
            Else - Actions
Though its better to use a variable for the unit group to clear up the leaks.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top