# Heroes limit according to amount of players on the map. HELP

#### uneric

Level 1
Hello, to be concrete, I am having the following problem.
I have a own map where the number of players is 5 vs 5, where each player has a choice of three heroes each ..
Now what I'd like to know

In the event that the game starts being 5vs4 players lack one .. as I can make a detonator to alert the game that '' if a player is missing on the opposing team (eg, 5 vs 4, 4 vs 3 3 vs 2, etc.), the team with more players can not make more than 2 heroes by player '' I explain?

If anyone can guide me appreciate it! Thank you!!

#### TheDoener

Level 3

Is it a normal map or something like Dota?

#### neven1

Level 8
I think i solved it but didn't tested it thou

First Trigger.Ofc you will have to add your own players to certain group ;p

• Setting player
• Events
• Map initialization
• Conditions
• Actions
• -------- Player group 1 --------
• Player Group - Add Player 1 (Red) to Player_Group[0]
• -------- Player group 2 --------
• Player Group - Add Player 6 (Orange) to Player_Group[1]
• -------- Hero number limit --------
• Set Hero_training_limit = 2
second trigger

• Checking slot
• Events
• Time - Every 0.50 seconds of game time
• Conditions
• Actions
• Player Group - Pick every player in Player_Group[0] and do (If (((Picked player) slot status) Equal to Has left the game) then do (Player Group - Pick every player in Player_Group[0] and do (Player - Limit training of Heroes to Hero_training_limit for (Picked player))) else do (Do nothing))
• Player Group - Pick every player in Player_Group[1] and do (If (((Picked player) slot status) Equal to Has left the game) then do (Player Group - Pick every player in Player_Group[1] and do (Player - Limit training of Heroes to Hero_training_limit for (Picked player))) else do (Do nothing))

Replies
4
Views
353
Replies
1
Views
423
Replies
4
Views
569
Replies
2
Views
557