hello,
am i using wrong synthax for this maxstat value?cause with this the script breaks
# Custom XP Points for Health
soldier.Stats.getHealth statFromGame; # this mission stat total
statChange.getHealth statFromGameDiff; # stat gained from engine this battle
BattleUnit.getHealthMax soldier maxstat; # .rul max stat
set statByModder statFromGame;
sub statByModder statFromGameDiff;
battle_game.randomRange value valueMin valueMax;
add statByModder value;
if neq statFromGameDiff 0;
soldier.Stats.setHealth statByModder;
end;
if i coment battleunit it works