- Joined
- Oct 27, 2008
- Messages
- 1,176
how do i setup a region to give a player a random hero?
Make the regions and call them something like HeroSpawnRegion. Give them array of the amount of players (12).
I'm not sure about the Create Unit thing. If not, you just have to do it the hard way:
- Pick Random Hero
- Events
- Unit enters RendomHeroRegion (<--- region to enter to get a random hero)
- Conditions
- Actions
- Create 1 Random Hero for (Owner of (Entering Unit)) at HeroSpawnRegion[Player Number of (Owner of Entering Unit))] Facing Default facing angle.
- Set RANDOM = Random Number between 1 and x (x is the number of heroes available to get as random hero)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- RANDOM equal to 1
- Then - Actions
- Create 1 Hero A for (Owner of (Entering Unit)) at HeroSpawnRegion[Player Number of (Owner of Entering Unit))] Facing Default facing angle.
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- RANDOM equal to 2
- Then - Conditions
- Create 1 Hero B for (Owner of (Entering Unit)) at HeroSpawnRegion[Player Number of (Owner of Entering Unit))] Facing Default facing angle.
- Else - Conditions
- Etc.