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

[Trigger] Referring to the caster unit on a unit that died under a debuff

Status
Not open for further replies.
Level 3
Joined
Aug 25, 2013
Messages
22
I know the title might look a bit unclear, so let me straighten it out

I made a spell that places a debuff (based off faerie fire)
If the target unit dies under said debuff, it creates a dummy unit belonging to the killer unit (buffs and debuffs are wiped on death so i had to use a damage detection system for this) and the dummy unit casts a custom version of Roar

The problem with this is that the dummy unit belongs to whoever kills the unit, and so the roar benefits whoever kills it. I added a condition of 'killed unit belongs to an enemy of owner of killing unit', however this still doesn't solve all issues, since if the unit is killed by a creep or a third player, you don't get the buff.

In short, I want the dummy unit to belong to the caster unit. I was thinking of creating another trigger in which it detects when someone casts that spell and then using a variable to refer to the caster, but then it wouldn't be MUI

Is there a way around this? Another alternative I thought was base the spell of the 'Parasite' spell and use the event 'Player summons an unit'
 
Level 3
Joined
Aug 25, 2013
Messages
22
Ok, thanks anyway for answering
gonna have to learn about them hashtables and indexers
 
Level 11
Joined
Nov 15, 2007
Messages
800
Indexers are really easy to use. If you're using a damage detection system it probably already comes with an indexer.
 
Status
Not open for further replies.
Top