• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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

Status
Not open for further replies.
Level 1
Joined
Sep 2, 2016
Messages
4
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!!
 
Level 8
Joined
Jun 13, 2012
Messages
336
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))
 
Status
Not open for further replies.
Top