• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Life Drain

Status
Not open for further replies.
Level 15
Joined
Mar 25, 2016
Messages
1,327
I think the spell you are requesting is not possible. Drain Life automatically stops once the friendly target's life is full. You cannot give a unit more hp than its maximum hp apart from casting life drain.
However you could make a work around and increases hp and maximum hp at the same time. With this solution units will not have more hp than maximum hp.
You would then have to trigger the life drain spell yourself and the maximum hp increase.
If this solution is ok for you, I can give it a try.
 
I think the spell you are requesting is not possible. Drain Life automatically stops once the friendly target's life is full. You cannot give a unit more hp than its maximum hp apart from casting life drain.
However you could make a work around and increases hp and maximum hp at the same time. With this solution units will not have more hp than maximum hp.
You would then have to trigger the life drain spell yourself and the maximum hp increase.
If this solution is ok for you, I can give it a try.

Please do.

Except for the last you can achieve this by chaning the gameplay constants and the Life-Drains values/targets filter.

I have done everything that has been suggested in other posts and it will not work.
-Gameplay constants for allow bonus and transfer life set to true
-Changing map data in options
-No 0 values

If you have a solution please provide a working test map.
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
In this map units with bonus hp will have increased maximum hp.
You can configure drain damage, transfer amount, decay for caster/allies and aoe range individually for each level.
I made two versions of drain spells. One is based on Life Drain and therefore has lightning effect, but cannot be cast on allies with full health. Because of this problem I made a Channel version, which can always be casted. However, if you want to have lightning effects here, you need to trigger them.

I used Bribe's GUI Unit Indexer and Earth-Fury's SetUnitMaxState which was originally written by Blade.dk.
I modified the SetUnitMaxState system to normal Jass.

If you use this spell, please credit all of the people mentioned above in your map.
 

Attachments

  • LifeDrainJASS.w3x
    31.5 KB · Views: 101
  • Like
Reactions: Kam
That works more like I would like.

I wish there was a way to have Life Drain behave like Mana Drain and allow bonus life.

@Jampion

I found this in a previous post and when I attempt to copy it into my map I am unable to cause the target unit to have bonus life. I copied his setup exactly. Thoughts?

Life Drain - Over Drain
 
Last edited:
Level 15
Joined
Mar 25, 2016
Messages
1,327
It works exactly as mana drain. Both allow bonus life/mana, but only on the caster. And both can transfer life/mana to an ally. What you need to do:
Game play constants:
Gameplay - Drain Gives Bonus ...
Gameplay - Drain Transfers ...
These must be true and they must be pink.

Life Drain:
The values in brackets are the same as in siphon mana in the respective mana fields.

Data Bonus Life Decay (3.00)
Data Bonus Life Factor (1.00)
Data Life Transferrred Per Second: ...
Stats Targets Allowed: (Air, Ground, Organic, Not self)
You must be able to target both enemy and friendly units.
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
I think it has something to do with patches. In the expansion campagin Kael cannot use it on friends. I did some testing and found out that you can only use it on friends, if your game data set is on melee(latest patch). It seems it is just not possible in the first patch.

What I wrote above about that the gameplay constants need to be pink is not true. It's enough if they are set to true.
 
I did some testing and found out that you can only use it on friends, if your game data set is on melee(latest patch).

This is so true it even enables that bonus Mana/Life. Did some tests too today.
Game data is changeable under: "Main Frame - Scenario - Options"
 

Attachments

  • Drain.w3x
    16.4 KB · Views: 73
  • Like
Reactions: Kam
Level 19
Joined
Dec 12, 2010
Messages
2,069
lol what're you talking about? this spell is a simple spell with no dependency under the patches
enable ally draining in "gameplay constants" and you'll be able to drain into ally. no, you cannot provide him bonus life anyhow using this method.
clicking "enemies" or "allies" in spell targets only adds a flag to the target's allowed list. if there's none set, any unit will fit, ally or enemy. it's obvious although blizzard have REALLY many inconsistencies with this behavior.
bonus life factor iirc multiply the HP drained over max, so if 0.5 and your dmg is 100/s, you'll drain by 50/s over max hp instead of 100.
 
Level 11
Joined
May 16, 2016
Messages
730
I would like my unit with Life Drain to be able to:

-Have bonus life
-Take life from enemy units
-Give life to friendly units
-Give bonus life to friendly units
Enjoy
1. Set all paramaters in the USE ABILITY trigger. (you can set drain power, period, coefficient of additional health, period of fading of the additional health and more)
2. Follow HOW TO IMPORT instruction to import the system in your map. (it's quite easy)
3. The Life drain drains health from targeted enemy or the caster gives health to targeted ally unit (pay attention on a life drain lightning effect, the direction of the life drain lightning depends on enemy or ally target.)
HOW IT WORKS:
CASTER - ENEMY: Caster starts to collect additional health after full health.
CASTER - FRIEND: The same but ally unit starts to collect it.
After cast is finished the caster or allied unit starts to lose the health.
This system is non-specific for only one hero. You can set more units with the life drain.
 

Attachments

  • LIFEDRAIN.w3x
    23.7 KB · Views: 52
Last edited:
  • Like
Reactions: Kam
Level 15
Joined
Mar 25, 2016
Messages
1,327
You can use "get unit flying height", but one big problem with using triggered lightning effects is, that you cannot get the target's projectile impact z as far as I know.
 

I think it may be reversed? When I cast ground to ground it is correct.

untitled-png.260539
 
Level 11
Joined
May 16, 2016
Messages
730
ADDITIONAL HEALTH COEFFICIENT (% OF DRAIN POWER) is how quickly the bonus life goes away?
Your drain power is for example 100. So you drain 100 health
If you have full then you start to collect additional health equaled to % of drain power. Set 0.5 then 100x0.5=50. every drain with full health gives you additional 50 health (or goes away after finishing cast)
P.S> You can submit it by yourself. i don't care.
 
Your drain power is for example 100. So you drain 100 health
If you have full then you start to collect additional health equaled to % of drain power. Set 0.5 then 100x0.5=50. every drain with full health gives you additional 50 health (or goes away after finishing cast)
P.S> You can submit it by yourself. i don't care.

Ok so I set the ADDITIONAL HEALTH COEFFICIENT to 1.00 because I want the transfer to be 1 to 1.

I'd like the decay rate of the bonus health to be slower. For instance I set life drain power to 10, and I would like the bonus like to decay at a rate of 2 per second.
 
Level 11
Joined
May 16, 2016
Messages
730
you
Ok so I set the ADDITIONAL HEALTH COEFFICIENT to 1.00 because I want the transfer to be 1 to 1.

I'd like the decay rate of the bonus health to be slower. For instance I set life drain power to 10, and I would like the bonus like to decay at a rate of 2 per second.
You have the parameter named PERIOD OF REMOVING ADDITIONAL HEALTH. Set it to 2 and enjoy.
 
Status
Not open for further replies.
Top