So i have been playing around with the editor for some time now and i cant seem to find "Set current health to" as i can remember it was named like that in Wc3. Been trying with other stuff like set custom value but i cant seem to find how to change the "Cusom value" part.
set unit property health regeneration rate -1 set it back to 0 when the time is up
Some units don't have a regeneration of 0. You could easily store the value as a variable and restore it to that value when you are done, but if some upgrade or other effect modifies the unit's regeneration in the mean time, it will change to an incorrect value. The -1 regeneration will also override the regular value instead of subtracting from it, though this could easily be fixed.
Still, I can't think of any reason why I wouldn't rather use a behavior. The burnout of Terran buildings at low HP and the bleedout of Zerg buildings not on creep is handled by a behavior and it works just fine.
So i have been playing around with the editor for some time now and i cant seem to find "Set current health to" as i can remember it was named like that in Wc3. Been trying with other stuff like set custom value but i cant seem to find how to change the "Cusom value" part.
I'm doing a spell like this
Event: Use "ability"
Condition "has buff"
and i want the action to remove one HP / sec
Thanks alot for the help Treever
I believe the Action you want is "Modify Unit Property"
Why don't you just create a behavior with a periodic damage effect and apply it to the unit?
set unit property health regeneration rate -1 set it back to 0 when the time is up
Some units don't have a regeneration of 0. You could easily store the value as a variable and restore it to that value when you are done, but if some upgrade or other effect modifies the unit's regeneration in the mean time, it will change to an incorrect value. The -1 regeneration will also override the regular value instead of subtracting from it, though this could easily be fixed.
Still, I can't think of any reason why I wouldn't rather use a behavior. The burnout of Terran buildings at low HP and the bleedout of Zerg buildings not on creep is handled by a behavior and it works just fine.