• 🏆 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 with movement

Status
Not open for further replies.
Level 11
Joined
Jan 23, 2015
Messages
788
Yes it is, but you have to trigger the whole spell.. you need to make a dummy unit which has a dummy spell with the life drain lightning.. make the unit cast the dummy spell when you cast the main spell, then make a periodic event every 1 second and reduce target's hp, and increase your hero's hp.. (you also need to move the dummy unit on the position of your hero every 0.3 sec, so it will look like the hero is casting the spell)
 
But, would you need a dummy unit? Couldn't the lightning be attached to the caster instead? As in this example-map I've made. Now, it's not perfect (I haven't modded for some time), but I think it does the job, however inefficient it is doing it :)

BTW: It's not MUI.
 

Attachments

  • Moving LifeDrain for Ryuuzaki.w3x
    24.5 KB · Views: 70
Level 24
Joined
Aug 1, 2013
Messages
4,657
Indeed, you just have to index the caster and add it to a group.
Every 0.03 seconds of gametime, you pick every unit in the group and update the lightning positions, apply the damage, increase a time counter and heal the caster.
When the timecounter reaches a certain amount or the distance is too large, you remove him from the group and remove the lightning.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
...reduce target's hp

Don't reduce the target's HP, but damage it instead.
Because when unit goes into Invulnerable, units are not supposed (supposedly) to "take damage" from any source.

Also, no need dummy unit for this case, as you can target the Caster to become the original location, and using Lightning to simulate the "Draining" effect.

Remember to put a threshold where the Caster and the Target is far from another - which disrupts the "Chain" and ending the spell, prematurely (well at least that's what in the Warcraft III default "Draining" spells mechanic).
 

sentrywiz

S

sentrywiz

I agree with defskull, dealing damage is better in this case, as invulnerability and other armor types can reduce the damage or nullify it while removing health goes through everything and can kill literally unkillable targets.
 
Status
Not open for further replies.
Top