• 🏆 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!

Damage/heal overtime death coil

Status
Not open for further replies.
Level 9
Joined
Apr 23, 2011
Messages
527
Make 2 abilities from Rejuvenation, and then a dummy ability. One will heal the target, and another will have a negative heal (meaning, it deals damage)

When a unit starts the effect of the dummy ability, check if the unit is undead. If so, make a dummy unit cast the healing ability, if not, make it cast the damaging ability.
 
Level 38
Joined
Feb 27, 2007
Messages
4,951
Immolation, two different ones.
Won't work because undead isn't a targeting type you can set in abilities, as I just learned. That you thought it was too goes to prove it really should be. Only way to check undead is via trigger comparison like Light suggested:
When a unit starts the effect of the dummy ability, check if the unit is undead. If so, make a dummy unit cast the healing ability, if not, make it cast the damaging ability.
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
The problem here is that Death Coil and Holy Light are the only two abilities that have different targeting behaviour depending on enemy or ally. If this behaviour is wanted here then this makes it really difficult.
Of course one can use triggers to check for the valid targets and damage/heal depending on the target. What happens if you order the unit to coil an enemy undead unit? Or order to coil an allied living unit? A normal death coil would not work and the game would display the error message.
With triggers you could order the unit to "stop" if an invalid target is chosen, but this will overwrite all orders in the order queue.

If one really wants to keep the order queue you have to use Death Coil as base ability. The downside is that you cannot use it on allies with full hp. Detecting when the death coil hits the target is difficult but not impossible. Might require a lot of work though.

It's probably best to ignore the fact that it overwrites the order queue. Otherwise it just gets a lot more complicated.

I would not use rejuvenation to damage enemies. negative healing != damage
Negative healing will not trigger damage events and you will not get credit for killing the unit.
 
Level 9
Joined
Apr 23, 2011
Messages
527
I would not use rejuvenation to damage enemies. negative healing != damage
Negative healing will not trigger damage events and you will not get credit for killing the unit.

It would perhaps be better to use another DoT ability base that actually damages units. Haven't used the editor in a while, so I don't remember any abilities that do this.
 
Status
Not open for further replies.
Top