• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Detect if unit died off life drain?

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,877
Here's one way of doing it, although I can't promise a 100% success rate:
  • Life Drain Kill
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Level of Life Drain for (Killing unit)) Greater than 0
      • (Current order of (Killing unit)) Equal to (Order(drain))
    • Actions
      • Game - Display to (All players) for 30.00 seconds the text: Life drain kill!
The only "issue" I can think of would be if your Dark Ranger had a Cloak of Immolation and it's periodic damage was what killed the enemy unit while channeling. So technically it wasn't the life drain that killed the unit if that matters you. The trigger should still run anyway. Honestly, now that I think about it this is probably not worth mentioning, lol.
 

Attachments

  • Life Drain Kill.w3m
    18.3 KB · Views: 6
Last edited:
Level 24
Joined
Feb 27, 2019
Messages
833
Can i somehow detect that unit died of a lifedrain?
If you could 100% conclude that the damage causing the kill was not dealt from any other source than lifedrain you would detect that the damage was from lifedrain. An obvious good step in that direction would be that the killing unit was casting life drain at the time of the dying units death but it would not be conclusive since it could have died from something else like a dot or as mentioned immolation.

There are at least two routes to go down.
1. Use the default/vanilla lifedrain and try to use parameters to narrow down the potential damage sources as to it being 100% chance it died from that specific lifedrain. Another parameter that could be added to Uncles trigger would be that the dying unit was infact the target of the lifedrain ability. There are probably more parameters that could be added to narrow down the margin of error to maybe close to or 0%.

2. Another route is to trigger the lifedrain in such a way that its 100% chance the target died from lifedrain. Such as using a damage engine with a custom damage type and when a unit recieves lethal damage from that damage type its 100% chance it came from that triggered lifedrain.
 
Last edited:
Top