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

Running melee AI only for specific computer players.

Status
Not open for further replies.
Level 2
Joined
May 10, 2011
Messages
9
So, for my map every computer player needs to run the meele AI except for two.

  • Melee Game - Run melee AI scripts (for computer players)
^ This one makes all computer players work just fine, but the two who are not supposed to get them are screwed up entirely. They periodically send creeps towards the middle, but with the melee script enabled those units will just camp in their base and do not follow their intended purpose.

  • AI - Start melee AI script for Player: map.ai
I've tried this already (map.ai was there by default). Bots end up doing nothing. Does the normal melee AI have a special name that I have to use?
In any case, if you could help me get the melee AI for all bots but player 11 and 12 working, I'd be very grateful.

Note: Prior to the melee AI function the following happens is done:
It activates at the map initialization when the player is controlled by a computer and only takes a look at players 1-10
  • Set tempGroup = (Units owned by Player)
  • Unit Group - Pick every unit in tempGroup and do (Unit - Remove (Picked unit) from the game)
  • Custom script: call DestroyGroup( udg_tempGroup )
  • Set tempPoint = (Player start location)
  • Melee Game - Create (Race of Player) starting units for Player at tempPoint (Include Heroes)
  • Melee Game - Set starting resources (for all players)
  • Custom script: call RemoveLocation( udg_tempPoint )
Thanks in advance
 
Level 2
Joined
May 10, 2011
Messages
9
common.ai and Scripts/common.ai did not work for me. Alternatively, I can run a check which race the computer has and then apply the correct AI. Thanks, it works like that now.
 
Status
Not open for further replies.
Top