Stationary units
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Stationary units
Hey,
Does anyone know how to make enemy units stationary unless they see you, like in hide and seek in liberty.
Help is appreciated.
Thanks in advance,
Ealden
Does anyone know how to make enemy units stationary unless they see you, like in hide and seek in liberty.
Help is appreciated.
Thanks in advance,
Ealden
Ealden
Re: Stationary units
if you like what you saw in liberty you might just copy the relevant parts...
there's even some in-line documentation related to the guard units:
https://github.com/wesnoth/wesnoth/blob ... d_Seek.cfg
or are you looking for something less complicated?
there's even some in-line documentation related to the guard units:
https://github.com/wesnoth/wesnoth/blob ... d_Seek.cfg
or are you looking for something less complicated?
Re: Stationary units
The usual way is to give ai_special=guardian to the units you only want to move/attack if they can reach an enemy in one turn. Hide and Seek does things in a lot more complicated way, by switching the units from the completely idle side to a normal side, and vice versa.