- Joined
- Aug 18, 2009
- Messages
- 4,097
One of the remaining eagerly coveted features in wc3 is to abort unit expiration timers in order to use the blue bar display in the unit ui. The issue is that only the triggered version (UnitApplyTimedLife function) is passive enough to not affect the target in side fashions and permits dynamic durations.
This one, however, as the name suggests, kills the unit in the end, which is again no good. At least you can get rid of the bar instantly by removing the buff (that you have to input into the function) from the target unit, still the unit meets its fate.
That's why a solution would be to render the unit immortal meanwhile. I currently know but one way to trick death. A unit cannot die if it has <= 0 starting hitpoints (set max hitpoints to <= 0). This method seems not viable though since once you go above the death limit (0.405), you cannot return below without killing the unit in turn.
So do you have ideas how to either set up an expiration bar without side effects (like unit losing order, dying), remove the timed life effect without killing the unit or set the unit immortal later on?
This one, however, as the name suggests, kills the unit in the end, which is again no good. At least you can get rid of the bar instantly by removing the buff (that you have to input into the function) from the target unit, still the unit meets its fate.
That's why a solution would be to render the unit immortal meanwhile. I currently know but one way to trick death. A unit cannot die if it has <= 0 starting hitpoints (set max hitpoints to <= 0). This method seems not viable though since once you go above the death limit (0.405), you cannot return below without killing the unit in turn.
So do you have ideas how to either set up an expiration bar without side effects (like unit losing order, dying), remove the timed life effect without killing the unit or set the unit immortal later on?