Quantcast
Channel: The Battle for Wesnoth Forums
Viewing all articles
Browse latest Browse all 1507

WML Workshop • [avoid] clarification

$
0
0
Hi,
Here's a grab of the bottom right part of the map of a scenario I'm playtesting:
mapchunk.jpg
In the south west area of forest I randomly scatter side 7's units with this [avoid] clause:

Code:

    side=7    no_leader=yes    controller=ai    recruit=    [ai]      aggression=0.9      caution=0.1      [avoid]        terrain=W*^*      [/avoid]    [/ai]
This avoid clause is intended to force these units to stay in that lower right quadrant.
Yet one side 7 unit crossed the water and headed north (I can't see exactly what happened because these units have the [ambush] ability).
Before I start digging further, am I doing anything stupid here?
This side doesn't use any [micro_ai]s tho' a lot of others do.

I've used avoid terrain before, but only without wildcards as far as I can recall.

As the terrain to avoid is only 1 hex deep I'm wondering if the ai only looks at start and end hexes when considering whether to avoid somewhere and these units can cross the avoided terrain in one move (i.e. they start and end in allowed terrain even tho' they traverse terrain they should avoid)?
Any thoughts/comments greatly appreciated.

Cheers!
--Spannerbag

Statistics: Posted by Spannerbag — Yesterday, 10:28 pm



Viewing all articles
Browse latest Browse all 1507

Trending Articles