• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Bot only collects gold and does nothing

Status
Not open for further replies.
Level 3
Joined
Oct 20, 2017
Messages
52
Hello,
I'm having a big problem with AI.
I made a custom map that you defend your base against 4 bots of different races, in the beginning it worked well, because the bots attacked the smooth base, but after creating systems such as victory and defeat conditions and several other systems when I start the action '' Melee Game - Run melee AI scripts (for computer players) '' which is the moment when the bot starts making units to attack, they do nothing, they just collect gold in the gold mine and that's it, even with resources enough to build buildings or make units, they only collect gold. Any solution for that?
 
Level 17
Joined
Jul 1, 2010
Messages
721
1. Is the computer player's race set accordingly ? When you run "Melee Game - Run Melee AI for computer players", depending on the player's race it runs the appropriate script. Eg. Night Elf - Elf.ai, Human - human.ai, etc...
2. Do you have custom units ? Cause if you do maybe the computer needs a custom race AI script to specify which units to build.
If you still can't figure it out, post the map here and I'll fix it for you. I won't steal your map if you're worried.
 
Level 3
Joined
Oct 20, 2017
Messages
52
Discover the problem:
  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • Unit - Pause all units
I applied this so that the player types a command to start the game, and when the player types the command the bots start using:

  • Actions
    • Unit Group - Pick every unit in (Units owned by Player 7 (Green).) and do (Actions)
      • Loop - Actions
        • Unit - Unpause (Picked unit)
 
Status
Not open for further replies.
Top