• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Problem with damage taken

Status
Not open for further replies.
Level 7
Joined
Apr 17, 2017
Messages
316
Hi. I have two main questions. When we select "damage taken" event, does it have to be specific unit? Cause i am trying to make a spell called damage quota which is spirit link and shows the damage taken as floating text. But i can find something like owner of ..... unit. Also i couldn't find anything like if damage source is spirit link buff do this.
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
damage taken refers to the event "specific unit takes damage", so you always know which unit takes the damage (the specific unit). There is no generic unit event for this. You need a DDS (damage detection system) in order to detect damage on any unit. There are plenty of DDS on the hive.
 
Level 11
Joined
Jun 2, 2004
Messages
849
If your needs aren't complicated, a DDS isn't necessary. You should be able to easily add every unit to a Damage Taken trigger using Trigger - Add Event whenever a unit enters the map. This won't give you a lot of the useful information from a DDS, like what type of damage or whether it was a regular attack or an ability, though.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
If your needs aren't complicated, a DDS isn't necessary. You should be able to easily add every unit to a Damage Taken trigger using Trigger - Add Event whenever a unit enters the map. This won't give you a lot of the useful information from a DDS, like what type of damage or whether it was a regular attack or an ability, though.
It also leaks if units are constantly created and removed, unless the trigger is periodically destroyed.
 
Status
Not open for further replies.
Top