Alright well i got emboldened by my success making the gold-lumber trigger so im trying for an all random. Now what im guessing i would have to do, is add all of my heroes to an Player Group Array and then somehow give them out, is this correct? And if it is how would i be able to?
Event-
Map Initialization
Conditions-
Actions-
Unit Group - Pick every unit in(Units in ARHeroes <gen>) and do actios
Loop - Actions
Unit Group - Add (Picked Unit) to RandomHeroes(1)
Alright and ARHeroes = the region where my heroes are located and Random Heroes is my unit group variable.
Your going to have to define each hero in a unit array for example
Define Heroes
Events
Map initialization
Conditions
Actions
Set NumberOfHeroes = 4
Set RandomAmount = 4
Set Hero_Array[1] = Alchemist
Set Hero_Array[2] = Naga Sea Witch
Set Hero_Array[3] = Tinker
Set Hero_Array[4] = Beastmaster
For each (Integer A) from 1 to 4, do (Actions)
Loop - Actions
Set RandomData[(Integer A)] = (Integer A)
And Then
Events
Player - Player 1 (Red) types a chat message containing -random as An exact match
Conditions
(Number of units in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))) Equal to 0
Actions
Set RandomHero = (Random integer number between 1 and RandomAmount) Unit - Create 1 Hero_Array[RandomData[RandomHero]] for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
Set RandomData[RandomHero] = RandomCount
Set RandomCount = (RandomCount - 1)
The highlighted area is whats going to randomly pick and create your hero, Since you've listed all your heroes in Hero_Array it will pick a Hero_Array random number between 1 and the total amount of Heroes you've defined.