Problem concerning a Counter Spell (Damage Dealt)

Endurance

New Member
Reaction score
2
Hello! I got a Unit in my Map, that should counter an attack every 5 seconds.
I came up with the following triggers, everything works perfect except of the damage which should be applied. I am not quite sure how to register the damage taken since it always occurs to be 0 even though the Unit got damaged for more the 0. Does anyone have an idea on how to solve this problem?

Trigger:
  • test
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacked unit)) Equal to Warrior (Tank)
    • Actions
      • Unit - Order (Attacked unit) to Orc Troll Berserker - Berserk
      • Trigger - Add to Retaliation Copy <gen> the event (Unit - (Casting unit) Takes damage)




Trigger:
  • Retaliation Copy
    • Events
    • Conditions
      • ((Triggering unit) has buff Retaliation ) Equal to True
    • Actions
      • Set TEMP_Point = (Position of (Attacking unit))
      • Set TEMP_Unit = (Attacking unit)
      • Unit - Create 1 TROLL for (Owner of (Attacked unit)) at TEMP_Point facing Default building facing degrees
      • Unit - Cause (Last created unit) to damage TEMP_Unit, dealing ((Damage taken) x 1.00) damage of attack type Spells and damage type Normal
      • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_TEMP_Point)
 

DioD

New Member
Reaction score
57
inside damage even there is no attacking unit.

damage source and trigger unit
 

Necrach

You can change this now in User CP.
Reaction score
62
Just out of curiosity, shouldn't you make a condition that requires the attacking unit to be an enemy? It feels like this ability can be abused by an ally attacking the Warrior :p
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
no this trigger is not working right now, its leaking events.

the first trigger will add a new event to the second trigger EVERY TIME your warrior type unit is attacked.
that means the second trigger will eventually end up with hundreds and thousands of events even for a single warrior unit in the game.
and therefor it might run hundreds and thousands of times at once when this warrior type unit is attacked.

more over the damage source might get damaged because it placed a negative buff on the warrior like faerie fire. this will run the second trigger as well. numerous times.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top