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

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 trigger 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?

I leave the detonator limiting heroes to 3 ..

If anyone can guide me appreciate it! Thank you
 
Last edited:
Level 4
Joined
Jul 26, 2016
Messages
88
Not here to help with your problem at hand since im about to sleep, but I can see youre probably using a spanish version of the world editor, and "detonador" is a "trigger" in english. Just a bit of a heads up so you can be better understood : )
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,197
You simulate hero limit using triggers. Limit training to 1 + tech disable all heroes when total limit is reached.

When a hero is trained you increment the hero count for a certain player in an array. You can use another array to keep track of maximum allowed heroes per player. When hero count equals maximum allowed you disable all heroes using the tech disable unit action. When a player leaves you recalculate hero maximum for each player, and then re-run the disable test.
 
Status
Not open for further replies.
Top