• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Detect wich skill is causing damage

Level 13
Joined
Mar 22, 2021
Messages
176
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