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

AI orders help

Status
Not open for further replies.
Level 4
Joined
Oct 13, 2009
Messages
43
so basically i have Castle like map, i edited AI and everything works fine but, how can i make my AI leave some units in their base at certain region?

i have Towers and i need AI to leave some units there.
 
You can use a unit group variable for your defender units that should stay in base. (DefenderGroup)
When new units gets spawned you can check the number of units in DefenderGroup and decide you want to add it or not.
You can periodicly pick all units in DefenderGroup and let them patrol somewhere in your base or anything you want.
If you don't add a spawned unit to DefenderGroup you logically order it to attack somewhere outside the base.
 
Status
Not open for further replies.
Top