• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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
781
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