Set unit moves to maxmoves?
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 unit moves to maxmoves?
Hi I have an effect which sets units current available moves but seem to have to specify this literally eg moves=5 is there some wml which would set to max availavble moves?
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
Re: Set unit moves to maxmoves?
{VARIABLE unit.moves $unit.max_moves}
Re: Set unit moves to maxmoves?
thx gave me some idea to use this
Code: Select all
moves=$unit.max_moves
Code: Select all
#define RESTORE_MV_PROJECTILE_ADJ
#if player moved new projectile to a location adjacent to unit which spawned it on an option menu, restore all mv points
[event]
name=moveto
first_time_only=no
[modify_unit]
[filter]
role=projectile
side=$side_number
x=$unit.x
y=$unit.y
[filter_adjacent]
adjacent=n,ne,se,s,sw,nw
is_enemy=false
side=$side_number
id=$unit.modifications.trait[0].id
#role=Commander #replace with some filter for unit which spawned the projectile
[/filter_adjacent]
[/filter]
moves=$unit.max_moves
[/modify_unit]
[/event]
#enddef
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)