• 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] Random Hero

Status
Not open for further replies.
Level 16
Joined
Jul 21, 2008
Messages
1,121
You must make hero array variable in initialization trigger in your map. (N is the last hero number)

  • Set Hero[1] = YourHero1
  • Set Hero[2] = YourHero2
  • Set Hero[3] = YourHero3
  • Set Hero[4] = YourHero4
  • Set Hero[N] = YourHeroN
As Day-Elven said, make item named Random Hero as powerup and put it in your Tavern. Use Unit - Aquires an Item event to detect when Random Hero is purchased.
Following are actions of giving random hero:

  • Set TempInt = Random Number Between 1 and N
  • Unit - Create 1 Hero[TempInt] for (Owner of (Buying Unit)) ...
 
Status
Not open for further replies.
Top