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

[Solved] How to Detecting Damage Target From Trigger and Attack with Damage Engine?

Status
Not open for further replies.
Level 6
Joined
Jul 22, 2015
Messages
66
It possible damage engine from Bribe detecting damage from trigger? If i cast my spell like bash then the trigger is fired instead of auto attack, I tried so many times until i change it to Spell damage, but that was not i wanted i need keep Hero attack type but different from the Auto Attack and Trigger fired Spell here is my trigger. and also my attachment file for more info.
  • LetsCoba
    • Events
      • Game - DamageEvent becomes Less than or equal to 1.00
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Flail Smack for DamageEventSource) Greater than 0
          • (Ability Cooldown Remaining of DamageEventSource for ability Flail Smack ) Equal to 0.00
          • IsDamageMelee Equal to True
        • Then - Actions
          • Set HeroLevel = (Hero level of DamageEventSource)
          • Set DamageEventAmount = (DamageEventAmount x (1.50 + (0.10 x (Real(HeroLevel)))))
          • Set FlailDamage = (DamageEventAmount x 0.50)
          • Unit - Add Cargo Hold (Effect Fired) to DamageEventSource
          • Set GenericPoint = (Position of DamageEventTarget)
          • Special Effect - Create a special effect at GenericPoint using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set GenericGroup = (Units within 275.00 of GenericPoint matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of DamageEventSource)) Equal to True) and ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) i)
          • Unit Group - Pick every unit in GenericGroup and do (Actions)
            • Loop - Actions
              • Unit - Cause DamageEventSource to damage (Picked unit), dealing FlailDamage damage of attack type Hero and damage type Normal
        • Else - Actions

  • Bash
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Stunning Bash
    • Actions
      • Set Level = (Level of Stunning Bash for (Triggering unit))
      • Set Damage = (100.00 x (Real(Level)))
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing Damage damage of attack type Hero and damage type Normal
      • Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Set Stunchance = (Random integer number between 1 and 3)
      • Set StunPoint = (Position of (Target unit of ability being cast))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Stunchance Equal to 1
        • Then - Actions
          • Unit - Create 1 Peasant Caster for (Owner of (Triggering unit)) at StunPoint facing Default building facing degrees
          • Unit - Add Stun to (Last created unit)
          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
          • Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
        • Else - Actions
      • Custom script: call RemoveLocation(udg_StunPoint)
  • DamageEvent
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Flail Smack
    • Actions
      • Unit - Remove Cargo Hold (Effect Fired) from (Triggering unit)
 

Attachments

  • FlailSmackandBash.w3x
    702.1 KB · Views: 1

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,552
Not 100% sure what you're asking but these conditions exist for checking the damage:
IsDamageMelee
IsDamageRanged
IsDamageSpell
IsDamageCode

Try a combination of them, I remember in my map I had to use all four of them in one Condition for some reason.

Also, this Event is usually unsafe:
  • Unit - A unit Finishes casting an ability
I wouldn't use it unless positive it can't be interrupted.
 
Last edited:
Level 6
Joined
Jul 22, 2015
Messages
66
Not 100% sure what you're asking but these conditions exist for checking the damage:
IsDamageMelee
IsDamageRanged
IsDamageSpell
IsDamageCode

Try a combination of them, I remember in my map I had to use all four of them in one Condition for some reason.
i already add in on combination of them,but still the trigger are fire if i using my triggering spell

Also, this Event is usually unsafe:
  • unit.gif
    Unit - A unit Finishes casting an ability
I wouldn't use it unless positive it can't be interrupted.
The problem if i'm using starting effect ability when the corpse fired it always drop Crypt Fiend decay that why i'm using this to prevent that happen.
 
Level 6
Joined
Jul 22, 2015
Messages
66
  • Events
    • line.gif
      joinbottom.gif
      unit.gif
      Unit - A unit Starts the effect of an ability
  • joinminus.gif
    cond.gif
    Conditions
    • line.gif
      joinbottom.gif
      if.gif
      (Ability being cast) Equal to Stunning Bash
  • joinbottomminus.gif
    actions.gif
    Actions
    • empty.gif
      join.gif
      set.gif
      Set Level = (Level of Stunning Bash for (Triggering unit))
    • empty.gif
      join.gif
      set.gif
      Set Damage = (100.00 x (Real(Level)))
    • empty.gif
      join.gif
      unit.gif
      Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing Damage damage of attack type Hero and damage type Normal
    • empty.gif
      join.gif
      ani.gif
      Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
    • empty.gif
      join.gif
      ani.gif
      Special Effect - Destroy (Last created special effect)
    • empty.gif
      join.gif
      set.gif
      Set Stunchance = (Random integer number between 1 and 3)
    • empty.gif
      join.gif
      set.gif
      Set StunPoint = (Position of (Target unit of ability being cast))
    • empty.gif
      joinminus.gif
      if.gif
      If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • empty.gif
        line.gif
        joinminus.gif
        cond.gif
        If - Conditions
        • empty.gif
          line.gif
          line.gif
          joinbottom.gif
          if.gif
          Stunchance Equal to 1
      • empty.gif
        line.gif
        joinminus.gif
        actions.gif
        Then - Actions
        • empty.gif
          line.gif
          line.gif
          join.gif
          unit.gif
          Unit - Create 1 Peasant Caster for (Owner of (Triggering unit)) at StunPoint facing Default building facing degrees
        • empty.gif
          line.gif
          line.gif
          join.gif
          unit.gif
          Unit - Add Stun to (Last created unit)
        • empty.gif
          line.gif
          line.gif
          join.gif
          unit.gif
          Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
        • empty.gif
          line.gif
          line.gif
          joinbottom.gif
          unit.gif
          Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
      • empty.gif
        line.gif
        joinbottom.gif
        actions.gif
        Else - Actions
    • empty.gif
      joinbottom.gif
      page.gif
      Custom script: call RemoveLocation(udg_StunPoint)
Basically i don't want this 'unit - cause damage' fire for my passive.
 
Status
Not open for further replies.
Top