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

Status
Not open for further replies.
Level 5
Joined
Aug 26, 2004
Messages
114
I'm gonna make a kind a Hero Arena and i have done picked out lots of Heroes and placed them on the map... And you can select any off them but i want to make a Random Selection so when you click on the Random Unit i have put out the Wc3 shall automaticly choose one Hero and place it on the map and give it a extra Item... How do i make that?
 
Level 9
Joined
Sep 8, 2004
Messages
633
I'll tell you step by step:

1- Make a variable, integer.
2- A trigger, when random is chosen = Set (yourvariable) is a random number between (x) and (y).
3- Then a trigger which is fired after the randomisation. containing an if/then/else for each hero, if (yourvariable) is equal to (1) then Unit - create (q)

If you don't understand this, i can make it for you. Just ask.
 
Status
Not open for further replies.
Top