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

Computer hero selection system

Status
Not open for further replies.
Ok, let's say I have 6 heroes that can be bought from a tavern, I buy a hero and the trigger forbid me to buy any other hero. Now, the rest heroes have no one to buy them. Any ideas, tutorials how can I make a smart AI that choose a hero if it is computer slot(after there are no more players to choose)?
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
This belongs in the World Editor Help Zone. Please read rules before posting. It says what this section is for right above the Thread.
Triggers & Scripts In this forum you may ask for help on fixing a trigger or script. But if you need help getting started with a trigger, this is not the right place — use the World Editor Help Zone.

It would help if you explain your problem a lot better.

If you want a trigger that will not allow others to pick the same heroes. Example: Player 1 picks Archmage then player 2 can't pick Archmage. Then use a loop and add this.
  • Player - Limit training of Archmage to 0 for Player 1 (Red)
Change Player 1 to the picked player. Use a trigger at 0.00 time to check how many players are users. Each time a user picks a unit increase a different number. When the numbers match run trigger that picks Heroes for Computer players.
 
Status
Not open for further replies.
Top