- Joined
- Mar 24, 2013
- Messages
- 1,105
So, a while ago I asked for some help on a random hero trigger, and I used to form this one, but it still does not work as I intend it too. I want it to Random a Hero for all the players but I don't want anyone to be able to have the same hero. So what am I doing wrong? Thanks!
-
GameStart
-
Events
-
Player - Player 1 (Red) types a chat message containing -start as An exact match
-
-
Conditions
-
Actions
-
Set HeroTypeCount = 13
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked player) controller) Equal to User
-
((Picked player) slot status) Equal to Is playing
-
-
Then - Actions
-
Player Group - Add (Picked player) to PlayerGroup
-
Set HeroType[1] = Half-Dragon
-
Set HeroType[2] = Lost Soul
-
Set HeroType[3] = Twilight Huntress
-
Set HeroType[4] = Sinister Seal
-
Set HeroType[5] = Ballista
-
Set HeroType[6] = Demolisher
-
Set HeroType[7] = Nature's Voice
-
Set HeroType[8] = Slicer
-
Set HeroType[9] = Keeper of the Grave
-
Set HeroType[10] = Pauer
-
Set HeroType[11] = Morg
-
Set HeroType[12] = Flying Bomber
-
Set HeroType[13] = MotherOfAll
-
Set RandomHeroInt = (Random integer number between 1 and HeroTypeCount)
-
Unit - Create 1 HeroType[RandomHeroInt] for (Picked player) at (Random point in Arena2 <gen>) facing Default building facing degrees
-
Hero - Set (Last created unit) Hero-level to 7, Hide level-up graphics
-
Unit - Make (Last created unit) Invulnerable
-
Selection - Add (Last created unit) to selection for (Picked player)
-
Camera - Pan camera for (Picked player) to (Position of (Last created unit)) over 1.00 seconds
-
Unit Group - Add (Last created unit) to RandomHero
-
Set HeroType[RandomHeroInt] = HeroType[HeroTypeCount]
-
Set HeroTypeCount = (HeroTypeCount - 1)
-
Countdown Timer - Start ArenaStartTimer as a One-shot timer that will expire in 1.00 seconds
-
Trigger - Turn on Arena start <gen>
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
-
-