WildTurkey
Previously known as giv_me_rep
- Reaction score
- 87
Cant get the trigger to detect damage taken. I know it doesnt work well using event is attacked and event response damage taken but is there a way I can get this to work well. Want it to reflect damage from all sources only to a single target not to all like spiked carapace.
Current code not working:
Current code not working:
Code:
Sacrificial Pact Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Sacrificial Pact
Actions
Set SacrificialPact_Unit[(Player number of (Owner of (Triggering unit)))] = (Target unit of ability being cast)
Set SacrificialPact_Active[(Player number of (Owner of (Triggering unit)))] = True
Set Temp_Point = (Position of (Triggering unit))
Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
Custom script: call RemoveLocation (udg_Temp_Point)
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Unit - Add Sacrificial Pact Buff to (Last created unit)
Unit - Order (Last created unit) to Human Priest - Inner Fire (Target unit of ability being cast)
Wait 25.00 seconds
Set SacrificialPact_Active[(Player number of (Owner of (Triggering unit)))] = False
Sacrificial Pact Effect
Events
Unit - A unit Is attacked
Conditions
SacrificialPact_Active[(Player number of (Owner of (Attacked unit)))] Equal to True
Actions
Wait 1.00 seconds
Unit - Set life of (Attacked unit) to ((Life of (Attacked unit)) + (Damage taken))
Unit - Cause (Attacked unit) to damage (Attacking unit), dealing (Damage taken) damage of attack type Spells and damage type Normal