| 05-05-2004, 10:49 PM | #1 |
I've looked at and followed the hero selection threads that are out there and i've done what they've said and it's still not working. And vexorian's system is good but it's not the way i want hero selection in my map. so here's how i've got it set up. -------------------------------------------------------------------------- Events- unit- a unit enters select random hero conditions- actions- (the hero1, hero2 etc. are unit type variable arrays) set hero5[5]= medic set hero4 [4] = general set hero3 [3] = sniper set hero2 [2] = machine gunner set hero1 [1] = explosive spec. set radom_intg = random integer number between 1 and 5. wait 0.02 seconds unit- remove entering unit from the game unit- create 1 hero[random_intg] for owner of entering unit at center of playable map area over 0.0 seconds (hero is a unit type variable array) -------------------------------------------------------------------------- Can anyone say what i need to do to make it work? thanks. |
| 05-05-2004, 11:42 PM | #2 |
I don't think this is all that this is all that different from your trigger, but I just tested it and it does work. Code:
Melee Initialization
Events
Unit - A unit enters [u][color=Blue]Region[/color][/u]
Conditions
Actions
Trigger - Turn off (This trigger)
Set HeroType[1] = Blood Mage
Set HeroType[2] = Paladin
Set HeroType[3] = Shadow Hunter
Set HeroType[4] = Dreadlord
Set HeroType[5] = Archimonde
Set HeroType[6] = Mannoroth
Set Integer = (Random integer number between 1 and 6)
Unit - Explode (Triggering unit)
Unit - Create 1 HeroType[Integer] for Player 1 (Red) at [u][color=Blue]Region[/color][/u] facing Default building facing degrees |
| 05-06-2004, 12:17 AM | #3 |
I don't recommend making a Variable just for the random integer, just do a create Hero of type Hero[Random Integer between 1 and 6]. It's a bit more efficient. |
| 05-06-2004, 01:07 AM | #4 |
thanks Shimrra it works :D i had set seperate variables for each hero instead of the same one with different values that was the problem. and thanks for the tip doca. ^_^ |
