• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

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