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