Damage Event should not work for spell damage

Volkof

Well-Known Member
Reaction score
31
hello everyone,

I have this trigger which detects that when a hero with the item Lightning Spear attacks a target, that target will be chain lightninged.

It works if the Hero attacks, but it also fires when the Hero cast a damaging spell. Is there any way to make it only work for attacks and not spells?

Trigger:
  • Lightning Spear Attack
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has an item of type Lightning Spear) Equal to True
      • ((Attacked unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True
      • ((Attacked unit) is A structure) Equal to False
      • ((Attacked unit) is in LightningSpear_TargetGroup) Equal to False
    • Actions
      • Game - Display to (All players) the text: Atack
      • Set LightningSpear_TargetUnit = (Attacked unit)
      • Trigger - Add to Lightning Spear Lightning <gen> the event (Unit - LightningSpear_TargetUnit Takes damage)
      • Unit Group - Add LightningSpear_TargetUnit to LightningSpear_TargetGroup


Trigger:
  • Lightning Spear Lightning
    • Events
    • Conditions
      • ((Damage source) has an item of type Lightning Spear) Equal to True
    • Actions
      • Game - Display to (All players) the text: Lightning
      • Unit - Create 1 Dummy Unit for (Owner of (Damage source)) at (Position of (Damage source)) facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Chain Lightning [Lightning Spear] to (Last created unit)
      • Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Attacked unit)


Thanks in adv. (By th way. I dont want to use Orb of Lightning New)
 

Yoshii

New Member
Reaction score
74
there is a way; however you need to know jass; its called damage detection, its not possible with GUI
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top