Nestharus
o-o
- Reaction score
- 84
if GetUnitState(.Unit, UNIT_STATE_LIFE) <= 0 then
Should be GetWidgetLife or w/e.
I actually said that in this post as well..
GetWidgetLife is faster.
if GetUnitState(.Unit, UNIT_STATE_LIFE) <= 0 then
Should be GetWidgetLife or w/e.
I think you're mad.0.407 is better.
Because something abut 0.407 (or possibly 0.0407) being the exact level of health at which a unit dies. So <= 0 can be unreliable or something, I guess.
library test initializer init
private function init takes nothing returns nothing
call TriggerSleepAction(1.)
call SetWidgetLife(CreateUnit(Player(0),039;hpea039;,0.,0.,0.),0.407)
call SetWidgetLife(CreateUnit(Player(0),039;hpea039;,0.,0.,0.),0.406)
call SetWidgetLife(CreateUnit(Player(0),039;hfoo039;,0.,0.,0.),0.405)
endfunction
endlibrary