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

Is there a reliable way to detect normal attack with DamageEngine system?

Level 17
Joined
Jun 2, 2009
Messages
1,137
Here is the quick example.

Issue: This trigger runs with ANY damage taken from Hero (immolation, damage over time items or abilities etc et)

  • Warden Hero Yetenegi
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventTarget is A structure) Equal to False
      • (DamageEventTarget is Mechanical) Equal to False
      • (DamageEventTarget is Magic Immune) Equal to False
      • (DamageEventTarget belongs to an enemy of (Owner of DamageEventSource)) Equal to True
      • (Level of Hero yetenegi /// for DamageEventSource) Equal to 7
      • (Life of DamageEventTarget) Greater than (Life of DamageEventSource)
    • Actions
      • Trigger - Turn off (This trigger)
      • Set TempString = (String((Agility of DamageEventSource (Include bonuses))))
      • Unit - Cause DamageEventSource to damage DamageEventTarget, dealing ((Real((Agility of DamageEventSource (Include bonuses)))) + 1.00) damage of attack type Spells and damage type Magic
      • Game - Display to (Player group((Owner of DamageEventSource))) for 1.00 seconds the text: (|cff87cefa + (TempString + (|r + ek hasar!)))
      • Trigger - Turn on (This trigger)
My temporary solution with flaws:
  • DamageEventAmount Greater than or equal to 50.00
That can block all items or abilities that deals damage over time but also prevents hero deals damage with normal attacks and other abilities below 50 damage.

Is there a reliable way to detect only right click (auto attack) attacks?
 
Level 17
Joined
Jun 2, 2009
Messages
1,137
There is nowadays a condition check for that purpose:
  • (Damage From Normal Attack) Equal to True
Alternatively you can also check the damage type of the event and check if it matches the correct damage type - spells often (not always) deal the DAMAGE_TYPE_SPELL, which is only dealt by spells.
Uhm. I don't have a function like this.
By the way i am already using this function IsDamageSpell Equal to True but immolation or damage over time items & abilities counts as physical damage.
 
Level 24
Joined
Jun 26, 2020
Messages
1,852
@Remixer @Uncle Ok then how this system was detecting normal attacks in previous versions?
If this system cannot do that, how can we create we're own?
In older versions there wasn't a function that returns if the damage comes from a spell, it uses an ability bases on runic bracers to make the amount of all the spell damage being negative, then with various methods make then positive.
 
Top