How to make WML act based on wether or not a unit attacked

The place to post your WML questions and answers.

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.
Post Reply
falcon500
Posts: 14
Joined: October 26th, 2016, 7:28 pm

How to make WML act based on wether or not a unit attacked

Post by falcon500 »

I am trying to make a unit ability which is leadership that only works if the unit with the ability has attacked in that turn. so far, I have not been able to find any leads. anyone have input on this?
gfgtdf
Developer
Posts: 1432
Joined: February 10th, 2013, 2:25 pm

Re: How to make WML act based on wether or not a unit attack

Post by gfgtdf »

you have to use [filter] to check whether the unit still has attacks left.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
falcon500
Posts: 14
Joined: October 26th, 2016, 7:28 pm

Re: How to make WML act based on wether or not a unit attack

Post by falcon500 »

That helps, but i don't know what code to put in the filter. Maybe...

Code: Select all

[filter]
attacks=0
[filter/]
?
falcon500
Posts: 14
Joined: October 26th, 2016, 7:28 pm

Re: How to make WML act based on wether or not a unit attack

Post by falcon500 »

thanks! this is exactly what I need. I just added it. :D
Post Reply