• 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 to make a -ar random command

Status
Not open for further replies.
Level 11
Joined
Jun 20, 2009
Messages
880
There is a very simple way to do it. You'll only need 2 triggers. In first trigger,
you need to set your heroes into variable:
  • Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Hero[1] = Paladin
      • Set Hero[2] = Archmage
      • Set Hero[3] = Mountain King
      • Set Hero[4] = Blood Mage
Next do this:
  • Ar
    • Events
      • Player - Player 1 (Red) types a chat message containing -ar as An exact match
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set HeroInteger = (Random integer number between 1 and 4)
          • Unit - Create 1 Hero[HeroInteger] for (Player((Integer A))) at (Center of (Playable map area)) facing Default building facing degrees
And for -ap mode, just create taverns so players can pick heroes.
 

Attachments

  • ArTest.w3x
    16.4 KB · Views: 57
Status
Not open for further replies.
Top