Rest-triggered abilities
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.
Rest-triggered abilities
Can an ability become active only if the unit is rested? Specifically, is it possible to have a unit become hidden if it doesn't move? If so, how?
Nothing is true; everything is permissible.
- Pentarctagon
- Project Manager
- Posts: 5564
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Rest-triggered abilities
You could check at the end of a turn if the unit with the ability has used any of its movement points. If it hadn't moved, set a variable to whatever value you want to mean it hasn't moved. Then at the start of the next turn, check that variable, and if it is the right value apply the ability to the unit. Then use another event to remove the ability's affects if it moves.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: Rest-triggered abilities
You should be able to do it without any events, using ability filters. Either of these ought to work:
Code: Select all
[hides]
...
[filter]
[filter_wml]
resting=yes
[/filter_wml]
[/filter]
...
[/hides]
[hides]
...
[filter]
[filter_wml]
moves=$this_unit.max_moves
[/filter_wml]
[/filter]
...
[/hides]
Re: Rest-triggered abilities
That's what I was hoping.
Thanks guys!
Thanks guys!
Nothing is true; everything is permissible.