• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] [Solved] "Attacking unit" not working?

Level 1
Joined
Aug 4, 2025
Messages
2
I feel like this should be working? I usually try to use any other options to avoid triggers, but lately I'm trying to understand them more.
So I was trying this:
1769796096141.png


At first I was using an And in conditions with the current one to check if the unit died and a second "(Attacking unit is hero) equals to true." But that wasn't working.
I reduced it to testing, so at it is the game prints the name of the unit that dies but it should also print the name of it's enemy right? But only one of them gets printed.

Also I know the variables do nothing right now, but I got the idea it's better to store these values in variables since they can sometimes get lost in triggers?
Ultimately, I was trying to make a trigger for when a unit dies specifically by a hero and then do something. Maybe there is a different way to do it? Am I not getting triggers right?
 
I feel like this should be working? I usually try to use any other options to avoid triggers, but lately I'm trying to understand them more.
So I was trying this:
View attachment 572609

At first I was using an And in conditions with the current one to check if the unit died and a second "(Attacking unit is hero) equals to true." But that wasn't working.
I reduced it to testing, so at it is the game prints the name of the unit that dies but it should also print the name of it's enemy right? But only one of them gets printed.

Also I know the variables do nothing right now, but I got the idea it's better to store these values in variables since they can sometimes get lost in triggers?
Ultimately, I was trying to make a trigger for when a unit dies specifically by a hero and then do something. Maybe there is a different way to do it? Am I not getting triggers right?
Just to clarify and expand on what MyPad said a little bit:

(Damage source) = Unit that caused the damage.
(Damage target) = Unit that took the damage.
(Triggering unit) = (Damage source). This is always the unit mentioned in an Event -> "A unit does ...".

Event Responses are named after their associated Events and are (generally) only usable immediately after that Event happens.

A unit Dies -> (Dying/Killing unit)
A unit is Attacked -> (Attacked/Attacking unit)
A unit gains a Level -> (Leveling hero)
A unit Starts the effect of an ability -> (Casting unit)

Follow this pattern. Note that (Triggering unit) and (Triggering player) are exceptions to this rule and are basically always usable.

Also, you do not need to use "And - All (Conditions) are true" here. That is the default behavior of any Conditions block. You will rarely need to use "And".
 
Last edited:
Thank you both! Yes, changing the variables to Damage Source and Damage Target did it. It makes sense once you realize, I was totally convinced those two would work the same as Attacking/Attacked unit in any event.

This is why I kept triggers far away for so long, they are so confusing sometimes, but now I know 😅
 
Back
Top