• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Current Life greater than Max Life ?

Status
Not open for further replies.
Level 13
Joined
Jul 15, 2007
Messages
763
looks like you are right
lifedrain-png.240645
 
You can only pause it or reset it with triggers and object editor after you have added it, it is very hard to control since you can't even detect the amount/s.

Edit: You might be able to control it a bit better through the use of a dummy however even then you can still barely control it however at least damage events would start working again.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
If you cast life drain or siphon mana to an ally, it gives them health and/or mana.
You could use this to set the amount by having a really high rate drain ability and having an invisible dummy transfer its life/mana to something. You'd also have to hide the lightning effect somehow though.
However, I am not sure if you can somehow bypass the limit AND use this trick at the same time.
 
Level 11
Joined
Oct 9, 2015
Messages
721
The life didn't go back to max hp when it got hit, because the bonus life decay is set to 0, I have been able to make current life > max life for the caster, but I need to make it work on the target, because I'll dummy it and the unit receiving the bonus can't be order interrupted and all...
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
It is JASS code.
The function name is SetWidgetLife and it has 2 parameters.
There is no way I changed it.

Also, you can use it like it is used here http://www.hiveworkshop.com/threads...f-unit-to-1-when-it-dies.285731/#post-3069925
And it cannot exceed maximum life and will set it to maximum life if the life parameter is higher than it.
That is why it will fail in most DDS, because this function is used in almost every one of them.
 
Level 11
Joined
Oct 9, 2015
Messages
721
so it will not work for me :( but here's the thing: I've been able to acomplish the overdrain, but only for the caster, I want to create a dummy unit that will "donate" life to my main unit. So what I need is an overdrain (current life > max life) for the target of life drain, and not the caster. Can you help me with that please?
 
Status
Not open for further replies.
Top