Set Movement Recovery per turn?
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.
Set Movement Recovery per turn?
Is there a way to set a unit's movement point recovery per turn other than just setting max moves?
I want to make a Sprinter unit that can run long distances in a single turn, but requires rest to regain stamina. So something like 10 max moves, but it recovers only 4 moves per turn. Is there any way to do this?
I want to make a Sprinter unit that can run long distances in a single turn, but requires rest to regain stamina. So something like 10 max moves, but it recovers only 4 moves per turn. Is there any way to do this?
Re: Set Movement Recovery per turn?
I don't know if there is a simple way to alter how the move recovery works.
But otherwise you could save the remaining moves of sprinters at each side turn end and at beginning of each side turn manually set the moves = remaining + 4
But otherwise you could save the remaining moves of sprinters at each side turn end and at beginning of each side turn manually set the moves = remaining + 4
- beetlenaut
- Developer
- Posts: 2814
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: Set Movement Recovery per turn?
Yes, you have to use events. The best way to store the current max_moves would be in a unit variable. Then you would set the moves to the value of that variable in a turn refresh event then add 4 to the variable. (If you change the moves before the turn refresh, your changes will be reset during the refresh.)
However, the easiest thing to do would be to change each sprinter's max_moves in a side turn event. Increase it by 4, then reduce it to the maximum if it went over. That way you can do it to all the sprinters--you don't need to check them or store anything.
However, the easiest thing to do would be to change each sprinter's max_moves in a side turn event. Increase it by 4, then reduce it to the maximum if it went over. That way you can do it to all the sprinters--you don't need to check them or store anything.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide