• 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 order computer to buy units?

Status
Not open for further replies.
Computer selection system(CoSS)
Now, the trigger checks if the users chosen their heroes(Num_of_players), and then buy the heroes for the computers. The problem is I don't know how to order the computers to buy the a random hero.

Btw, is there any tutorial for whom I didn't know and explains this? I know in DoTA this is possible and I want to make this in my map.
edit: something like pick units in selling unit that are available?

  • CoSS
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • Num_of_players Equal to 0
    • Actions
      • Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) controller) Equal to Computer
            • Then - Actions
            • Else - Actions
 
Last edited:
Level 3
Joined
Feb 11, 2013
Messages
28
Set (integer) = random integer between 1 to 3 if integer equal to 1, then cre 1 hero for player 1 and dont forget to remove the hero fromtavern
 
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set heroes[1] = Paladin
      • Set heroes[2] = Archmage
      • Set heroes[3] = Mountain King
      • Set heroes[4] = Blood Mage
  • Actions
    • Unit - Order some_unit to train/upgrade to a heroes[(Random integer number between 1 and 4)]

I have a trigger that checks if the unit is bought. With this do you buy them or train them?

How will you choose the owner for this unit?
 
Last edited:
this would be used to train them. Like in a melee map. will upload another trigger then, one second.
edit: I would put this into your if block
  • Unit - Create 1 heroes[(Random integer number between 1 and 4)] for (Picked player) at your_loc facing Default building facing degrees
then there should be a IF that checks if the unit is unique for making.
 
Status
Not open for further replies.
Top