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!
Hi, i have a Trigger "Manual Hero".
My map only have 22 heros.
but i have a problem, when players decide wait to pick random hero,
One player decide random but other decide pick hero, for example he pick Mountain King, but the random of the other player is Mountain King too.
So team have 2 same heros
This is a bug. how if exist 22 heros. can pick 2 same heros?
Very easy for showing triggers to other people without them having to open images or anything, just click the "Show"-button for the hidden-tags and then they can copy/paste any line (to point out errors for example).
So what I understand is that you can only have 1 hero at the same time on the map (no doubles).
Because the images are kind-of confusing (I don't know which images belong to which trigger), I can only tell you a method on how to achieve this.
So you've got 22 heroes, this amount is stored in the variable "RandomCount".
Every hero type is stored into the unit-type variable "HeroType" (array).
The variable "RandomHero" decides which hero has been chosen for a player.
When a unit is picked/randomed, you can do this:
Set HeroType[RandomHero] = HeroType[RandomCount]
Set RandomCount = RandomCount - 1
So if there were 22 heroes and number 8 gets chosen.
Then HeroType[8] = HeroType[22] (this means that HeroType[8], the chosen hero, can now never be randomed again as it has been overwritten).
And then the array goes from 1 to 21 (otherwise you'd have a higher chance to get the hero in the last array).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.