HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Conditions for Event - Unit Death not activating

11-19-2007, 12:21 AM#1
Castlemaster
I'm trying to make a spell based off of Soul Burn that will cause an effect if the unit dies while having the buff. The trigger won't fire when I have the following condition.
Collapse JASS:
function Trig_Affliction_JASS_Conditions takes nothing returns boolean
    return GetUnitAbilityLevel(GetTriggerUnit(),'B001')>0
endfunction
When I remove this condition, the trigger fires fine. Is there a bug with trying to make conditions about dying units?

Thanks ahead of time.
11-19-2007, 12:29 AM#2
moyack
Unfortunately it doesn't works because the buff level becomes 0 when the unit dies, therefore the trigger won't activate.

In order to obtain this kind of effect, you need to trigger the spell in such way that it groups the units with the buff and after a small time detect if they die.
11-19-2007, 08:00 AM#3
cohadar
Or simply use UnitCustomData to store buff information.
11-19-2007, 08:17 AM#4
zen87
or- instead u make a spell based off dark arrow, trigger the soul burn effect, and when the unit dies, a dummy is spawned, you can detect the spawning of the dummy with "unit enter region" or "a unit is summoned" event, instantly remove the dummy and do the things you want :)
11-19-2007, 07:15 PM#5
Monky-Master
I have a question about this. Since Fire Lord's passive(The one that makes them blow up)activates on death, couldn't you base your ability on that?
11-19-2007, 07:52 PM#6
moyack
Quote:
Originally Posted by Monky-Master
I have a question about this. Since Fire Lord's passive(The one that makes them blow up)activates on death, couldn't you base your ability on that?
well... that's the problem that CastleMaster has: the buff is off as soon as the unit dies, so it can't be caught with the unit dies event.
11-20-2007, 01:59 AM#7
Castlemaster
For one some complications:
I want the spell to silence and deal damage over time. I'm thinking I may just base it off of Doom or parasite, and make the summoned unit like a dummy caster that will trigger the event, thereby bypassing the whole buff on death thing.