[SOLVED] moveto micro ai seemingly doesn't work
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.
[SOLVED] moveto micro ai seemingly doesn't work
I'm using a micro ai to have red mages move to villages. I'm not sure, though that it does anything, if a red mage moves onto a village which happens from time to time it seems rather random.
This is the code used, which is inside the prestart event:
This is the code used, which is inside the prestart event:
Code: Select all
[micro_ai]
side=2
type=Red Mage
ai_type=goto
action=add
ca_id=burningvillages
[filter]
id=burningvillages
[/filter]
[filter_location]
terrain=Gs^Vh, Ss^Vhs, Hh^Vhh
[/filter_location]
ca_score=350000
[/micro_ai]
Last edited by Anagkai on September 16th, 2018, 1:52 pm, edited 1 time in total.
My campaigns: Princess Nilwyn (available) & Home of the Undead (available)
Re: moveto micro ai seemingly doesn't work
You have the syntax mixed up, at least if you are trying to do what I think you want to do. Your current setup will try to move a unit with id 'burningvillages' to the terrain given in the location filter. You need to move the
type=Red Mage
line into the [filter]
tag (and delete the id inside the tag, of course).SP campaigns: Galuldur's First Journey (1.12 & 1.14) & Grnk the Mighty (1.10 & 1.12)
AI experiments: Micro AIs (wiki, forum thread, known/fixed bugs), Fred, AI-demos add-on
AI experiments: Micro AIs (wiki, forum thread, known/fixed bugs), Fred, AI-demos add-on
Re: moveto micro ai seemingly doesn't work
in short it probably means something like this:mattsc wrote: ↑September 14th, 2018, 8:31 pm You have the syntax mixed up, at least if you are trying to do what I think you want to do. Your current setup will try to move a unit with id 'burningvillages' to the terrain given in the location filter. You need to move thetype=Red Mage
line into the[filter]
tag (and delete the id inside the tag, of course).
Code: Select all
[micro_ai]
side=2
ai_type=goto
action=add
ca_id=burningvillages
[filter]
type=Red Mage
[/filter]
[filter_location]
terrain=Gs^Vh, Ss^Vhs, Hh^Vhh
[/filter_location]
ca_score=350000
[/micro_ai]
given that your [micro_ai] is in the right place as well.. or that you dont have same filter doing other stuff with higher priority. Let us know if it still not works.
Re: moveto micro ai seemingly doesn't work
It does work now. Thanks.
My campaigns: Princess Nilwyn (available) & Home of the Undead (available)