Keeping units in a Proximity

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

Moderator: Forum Moderators

Post Reply
User avatar
LordAwsomeness
Posts: 203
Joined: August 12th, 2013, 2:20 pm
Location: U.S.A.

Keeping units in a Proximity

Post by LordAwsomeness »

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?
- Been playing Wesnoth since 2004 and the 1.0.x versions.
- Creator of Undead Invasion MP Scenario Pack.
- Creator of Valeria MP Adventure
- Creator of LA_RPG ERA
enclave
Posts: 936
Joined: December 15th, 2007, 8:52 am

Re: Keeping units in a Proximity

Post by enclave »

hi, have you read this? https://wiki.wesnoth.org/Micro_AIs
If not, then it may help.. if yes then I don't know the answer sorry, somebody will help hopefully ;)
User avatar
LordAwsomeness
Posts: 203
Joined: August 12th, 2013, 2:20 pm
Location: U.S.A.

Re: Keeping units in a Proximity

Post by LordAwsomeness »

PERFECT! Thanks for the link! It had exactly what I needed!
- Been playing Wesnoth since 2004 and the 1.0.x versions.
- Creator of Undead Invasion MP Scenario Pack.
- Creator of Valeria MP Adventure
- Creator of LA_RPG ERA
enclave
Posts: 936
Joined: December 15th, 2007, 8:52 am

Re: Keeping units in a Proximity

Post by enclave »

LordAwsomeness wrote: May 6th, 2018, 3:05 am PERFECT! Thanks for the link! It had exactly what I needed!
I think I learnt today how it works.. so if you run into troubles I might try to help :D
Post Reply