Detect wich skill is causing damage

Level 13
Joined
Mar 22, 2021
Messages
174
Hey guys, I'm using damage engine 3.8 since i'm making custom spells for wc3 1.27b

I'm doing a frost skillset in wich 3 basic skills apply the same "Cold" buff.
What I want to do is that when the unit is affected by the cold buff and a second or third ability hits them, a dummy casts storm bolt on them.

The problem I ran into is I don't know if there's a way to detect spell damage from a particular skill and not the universal detect method the system has.

When I did this the game basically crashed as:

Blizzard damages them > Spell damage detected > Storm bolt casted > Spell damage detected > Storm bolt casted - on a infinite loop.

1759869226368.png
 
No, there is no way to detect which spell damaged unit.

If dummy's storm bolt hits instantly, you can avoid the endless loop crash by just turning your trigger off before ordering dummy to cast storm bolt and then turn the trigger back on.

If that is not feasible, then you have other option: While you do not know which spell dealt damage, you know which unit is the damage dealer. You could create a simple passive spell which does nothing and is named for example "Ignore damage event". Give it to your DUMMY SPELLs unit immediately after creation.
Then add a condition to your trigger to also check that the level of "Ignore damage event" spell for (Damage source) is equal to zero.
 
Back
Top