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

[Trigger] Hero Selection System

Status
Not open for further replies.
Level 2
Joined
Sep 24, 2006
Messages
8
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...
 
Level 11
Joined
Jul 12, 2005
Messages
764
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:
Level 2
Joined
Sep 24, 2006
Messages
8
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.
Top