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

how do i setup a region to give a player a random hero?

Status
Not open for further replies.
Level 18
Joined
Aug 23, 2008
Messages
2,319
Make the regions and call them something like HeroSpawnRegion. Give them array of the amount of players (12).

  • 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.
I'm not sure about the Create Unit thing. If not, you just have to do it the hard way:
  • 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.
 
Level 13
Joined
Oct 27, 2008
Messages
1,176
Make the regions and call them something like HeroSpawnRegion. Give them array of the amount of players (12).

  • 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.
I'm not sure about the Create Unit thing. If not, you just have to do it the hard way:
  • 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.


makes no sence wats so ever
PS i cant tell wats wat in wat u said
 
Level 13
Joined
Oct 27, 2008
Messages
1,176
i can make em cuz everything being a ? mark makes no damn sence
and saying wat the varibles should be would help too
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
HeroSpawnRegion is a region variable with an array for each player (so an array of max 12) which is where the hero is created.

RandomHeroRegion is also a region, but this region is the 1 where you have to enter with to pick a random hero.

RANDOM is an integer variable. The numbers range between 1 and the amount of heroes that you can get with the Random Hero function you want. So 20 possible heroes give: RANDOM = Random number between 1 to 20.
 
Status
Not open for further replies.
Top