- Joined
- Apr 6, 2008
- Messages
- 760
hi i have some math problems :/ i add hp to a unit with SetUnitMaxState system but i can figure how to remove the bonus hp xD i increse the hp with 10/20/30% (3 lvls reprecented as d.lvl)
well this is what i got so far
need a negative vaule here (- the added hp)
well this is what i got so far
JASS:
call AddUnitMaxState(u,UNIT_STATE_MAX_LIFE,GetUnitState(u,UNIT_STATE_MAX_LIFE)/100*(d.lvl*10))
need a negative vaule here (- the added hp)
JASS:
call AddUnitMaxState(u,UNIT_STATE_MAX_LIFE,GetUnitState(u,UNIT_STATE_MAX_LIFE)/100+(d.lvl*10)*(100*-1))