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

Make AI ignore pre-placed units

Status
Not open for further replies.
Level 2
Joined
Aug 14, 2017
Messages
12
Hello there, I'm working on a custom campaign where I am using a very simple and rudimentary Campaign AI based on some of the limited resources available online, along with trying to look for functions in the Common.ai file. I've encountered a slight snag in my approach. In my map I use athe InitAssaultGroup function and follow up with CampaignAttackerEx to create the assault group. However, if the AI has units on the map that fit the bill for the attack group, they will abandon their post and go join the attack. Additionally if I use CampaignDefenderEx the same behavior is observed, where the AI will abandon their post and proceed to defend the Start Location unit of the AI Player. I have browsed the forums and can't seem to find anything that would solve my issue.

Is there a way to make the AI ignore the pre-placed units in a map when creating their Attack/Defender groups?

Simply I could just make a copy of the unit and use those, as they would no longer have the same ID, but that seems tedious so I want to give the forum a shot first.
 
Status
Not open for further replies.
Top