• 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.

[Spell] AOE DoT Spell /killing unit problem

Status
Not open for further replies.
Level 14
Joined
Nov 4, 2006
Messages
1,241
Hi everyone,

i was wondering if anyone could think of an object editor way to create an instant cast spell with area of effect around the caster which applies a debuff to enemy units around him which damages them over time.

i tried to use roar and howl of terror with negative life regen, which works, however has one big drawback, because if the enemy unit dies from the spell, the kill is not credited to the unit.
One weird thing i noticed however is happening with the following trigger when a unit dies from the debuff:

  • Events
    • Unit - A unit Dies
  • Conditions
    • (Owner of (Triggering unit)) Equal to Player 12 (Brown)
  • Actions
    • Set kills[(Player number of (Owner of (Killing unit)))] = (kills[(Player number of (Owner of (Killing unit)))] + 1)
    • Unit - Set the custom value of (Killing unit) to ((Custom value of (Killing unit)) + 1)
the first action works, however the second one doesn't, even though both use "killing unit" as a reference. i also tried "Display name of killing unit", that also doesn't fire when a unit dies from the debuff.

i'll probably go to triggering it anyway, but maybe someone has an easy idea
 
Level 2
Joined
Apr 23, 2018
Messages
3
A solution could be to make it so that the DoT can't kill the unit, only get it really low. (I think "Envenomed spears" has this kind of interaction).
Moreover, is Player 12 supposed to be the unit which dies or which kills? If it's the latter, then (Triggering Unit) shouldn't be there I believe.
 
Status
Not open for further replies.
Top