• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Hero Selection System

Status
Not open for further replies.

RockmanderZ

R

RockmanderZ

Hi, got a problem with the Hero Selection System for my map, I want it this way it wil check all the players wheter they are active or not use, then when all players has selected their hero the trigger automatically turns off, and players cant choose any hero anymore...
 
Assuming that you store created heroes into a variable, you can make a trigger that runs every second, and checks if playing players already have their hero. If yes, then turn the hero-selection trigger off.

Events
Every 1 seconds of the game
Conditions
Action
Set Counter = 0

For each integer from 1 to 12
If
-Player(Integer A) is playing equal to false OR HeroChosen[Integer A] is not equal to (No unit)
Then
-Set Counter = Counter + 1

If
-Counter is equal to 12
Then
-Turn off (HeroSelection)
-Turn off (This trigger)


You see, Counter reaches 12 only if all playing players have a hero.
This was a sudden idea, but I think it should work.
 
Last edited:
Oh, thanks.. you would be the first one to have a rep. from me lol:)
Btw can you clear it up? It's a bit blurred to me..

Thanks..
 
Status
Not open for further replies.
Back
Top