Create unit specific ai movement goals
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.
Create unit specific ai movement goals
Is there a way, to define high priority movement goals for a specific type of unit?
As far as I understood the [goal] tag can not use a filter to make it unit specific. Is this true? And, if so, is there another way to achieve a similar effect.
As far as I understood the [goal] tag can not use a filter to make it unit specific. Is this true? And, if so, is there another way to achieve a similar effect.
My campaigns: Princess Nilwyn (available) & Home of the Undead (available)
Re: Create unit specific ai movement goals
You are correct about the [goal] tag not being unit specific. What you can do is to set goto_x, goto_y for the units for which you want to achieve this. Note, however, that this is not quite the same as setting a goal, because the goto candidate action (CA) is executed before all other CAs, while the move-to-targets (goals) CA is almost the last one. Most noticeable difference is that the former is executed before attacks and the latter after. So if you do this, you might want to have an event that changes the goto_x/y values dynamically as needed.
A more flexible way would be to use the Goto Micro AI. In addition to letting you select which units it applies to, you can also set the CA score, so you can choose whether you want it executed before or after other CAs.
A more flexible way would be to use the Goto Micro AI. In addition to letting you select which units it applies to, you can also set the CA score, so you can choose whether you want it executed before or after other CAs.
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