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

Players choosing side

Status
Not open for further replies.
Level 3
Joined
Oct 3, 2009
Messages
39
I seek help on how to make a trigger where people all start in one big region and have the option to enter region 1 and they will join team 1. If they enter region 2, they will join team 2 instead.

There's 6 players in the map, so once a team reaches 3 members, it should no longer be possible to join that team.

Is this possible? And how?

I suppose I need to make one team where all players start and then 2 seperate teams where people then join?
 
  • One
    • Events
      • Unit - A unit enters Team 1 <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of players in Team1) Less than 3
        • Then - Actions
          • Player Group - Add (Owner of (Triggering unit)) to Team1
        • Else - Actions
  • Two
    • Events
      • Unit - A unit enters Team 2 <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of players in Team2) Less than 3
        • Then - Actions
          • Player Group - Add (Owner of (Triggering unit)) to Team2
        • Else - Actions
 
Level 7
Joined
May 11, 2010
Messages
278
To clarify Pharaoh's triggers:
in the events "A unit enters Team 1 <gen>" and "A unit enters Team 2 <gen>", the "Team 1" and "Team 2" is regions.
Make sure the players start in player team "Team Neutral" or something.
 
Team 1 <gen>/Team 2 <gen> are regions created on your map actually.

Team 1/Team 2 are global GUI variables of type: player group, created in variable editor.

That condition can be found under: Conditions -> Integer Comparisons -> Player - Count players in Player Group.
Additionaly: main condition - ((Triggering unit) is A Hero) Equal to True - is the first comparison you will see when you click on 'Conditions' (boolean comparisons); now, just change classification to 'Hero'.
 
Status
Not open for further replies.
Top