• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Need GetDamageType function

Status
Not open for further replies.
Level 3
Joined
Apr 17, 2008
Messages
41
I've been looking for a function that would get the damagetype of the damage a unit takes, but I can't seem to find one. Does anyone know of something I could use for this? Does something exist for this?
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
if you want to check if a damage type is either spell or normal dmg you can use an orb effect which places a buff for a very short duration (0.01 sec)
make a trigger which fires every time a unit takes damage and check if the unit got the buff
if yes you know that the unit just dealt normal damage
you don't have to give this orb effect ability to every unit
just add it if a unit enters the map
 
Status
Not open for further replies.
Top