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?
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)
- Events
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)