• 🏆 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!

[Trigger] How to Detect Damage Type?

Status
Not open for further replies.
Level 19
Joined
Jul 12, 2010
Messages
1,713
Alright guys so I'm using the common damage trigger:
  • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 100.00 damage of attack type Spells and damage type Fire
I know I can detect if damage source is Normal Attack or Spell with this:
  • (Damage From Normal Attack) Equal to True
but I can't find a way to detect what type of damage has been dealt e.g Fire, Cold, Lightning

all of the available Damage Types:
upload_2021-3-3_21-34-33.png


And I want to know if it's possible with GUI or Jass
 
Last edited:
Level 4
Joined
Apr 11, 2018
Messages
24
It is possible via script but they didn't add a GUI block for it
  • Actions
    • Custom script: if BlzGetEventDamageType() == DAMAGE_TYPE_ACID then
    • -------- Your actions --------
    • Custom script: endif
Possible damage types:
Code:
DAMAGE_TYPE_UNKNOWN
DAMAGE_TYPE_NORMAL
DAMAGE_TYPE_ENHANCED
DAMAGE_TYPE_FIRE
DAMAGE_TYPE_COLD
DAMAGE_TYPE_LIGHTNING
DAMAGE_TYPE_POISON
DAMAGE_TYPE_DISEASE
DAMAGE_TYPE_DIVINE
DAMAGE_TYPE_MAGIC
DAMAGE_TYPE_SONIC
DAMAGE_TYPE_ACID
DAMAGE_TYPE_FORCE
DAMAGE_TYPE_DEATH
DAMAGE_TYPE_MIND
DAMAGE_TYPE_PLANT
DAMAGE_TYPE_DEFENSIVE
DAMAGE_TYPE_DEMOLITION
DAMAGE_TYPE_SLOW_POISON
DAMAGE_TYPE_SPIRIT_LINK
DAMAGE_TYPE_SHADOW_STRIKE
 
Status
Not open for further replies.
Top