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'
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'