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

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