- Joined
- Sep 26, 2009
- Messages
- 9,534
Expiration timer works some nice wonders,
Do you know how to remove this or how to prolong the time? I did
I tried modifying the life regeneration in the object editor field to -1.00 and setting the widget's life to the time I wanted it to expire at, but the regeneration is off-balance. I did this test:
The timer fired shortly after the unit died. I did another test with 10 seconds and the timer fired BEFORE the unit died. Obviously a widget's life decay is unreliable as an accurate time-scale measurement.
I think the solution may be found in UnitApplyTimedLife... that is, can the expiration timer on it be increased to prolong the life of the dummy unit?
call UnitApplyTimedLife(u, 'BTLF', 0.00)
.Do you know how to remove this or how to prolong the time? I did
call UnitRemoveAbility(u, 'BTLF')
and it just killed the unit! It's laughable.I tried modifying the life regeneration in the object editor field to -1.00 and setting the widget's life to the time I wanted it to expire at, but the regeneration is off-balance. I did this test:
JASS:
function TestDeath takes nothing returns nothing
call BJDebugMsg("Killed")
endfunction
function InitTrig_Test takes nothing returns nothing
call SetWidgetLife(CreateUnit(Player(0), 'hfoo', 0, 0, 0), 5.00)
call TimerStart(CreateTimer(), 5.00, false, function TestDeath)
endfunction
The timer fired shortly after the unit died. I did another test with 10 seconds and the timer fired BEFORE the unit died. Obviously a widget's life decay is unreliable as an accurate time-scale measurement.
I think the solution may be found in UnitApplyTimedLife... that is, can the expiration timer on it be increased to prolong the life of the dummy unit?