Keeping units in a Proximity

Discussion of all aspects of multiplayer development: unit balancing, map development, server development, and so forth.

Moderators: Forum Moderators, Developers

Post Reply
linedadelas
Posts: 1
Joined: February 12th, 2020, 7:26 am

Keeping units in a Proximity

Post by linedadelas »

Is there a way to make an AI unit (not the entire sire however, just that one unit or group of units) return to designated area rather than leaving and chasing another side? I know that ai=guardian works on individual units, however once a unit comes within the guardian units attack range, the unit will attack and chase until it is either dead, or mortally wounded and retreats to a village or kills the enemy unit and then roams the map aimlessly. How do I make a unit (or group of units) stay in a designated area without leaving after having the capability to attack another unit and return to its area after the enemy unit leaves its proximity?

mattsc
Posts: 1149
Joined: October 13th, 2010, 6:14 pm
Location: Hidden on the hex behind Fred

Re: Keeping units in a Proximity

Post by mattsc »

If I understand you correctly, the Zone Guardian Micro AI does what you want. There are also a couple other guardian AIs on that page that provide somewhat different behaviors.

Post Reply