- Joined
- Sep 13, 2013
- Messages
- 155
This trigger doesn't work. Why ?
Trigger:
EDIT: the spell is supposed to give health regeneration to the attacked unit based on the number of nearby allied structures.
Trigger:
-
Backdoor Protection
-
Events
- Unit - A unit Is attacked
-
Conditions
- ((Unit-type of (Attacked unit)) is A town-hall-type unit) Equal to True
- ((Attacked unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True
-
Actions
- Set HpReg = (Units within 750.00 of (Position of (Attacked unit)) matching ((((Matching unit) is A structure) Equal to True) and (((Matching unit) belongs to an ally of (Owner of (Attacked unit))) Equal to True)))
- Set HpRegLvl = (Number of units in HpReg)
- Unit - Add Backdoor protection (HP Reg) to (Attacked unit)
- Unit - Set level of Backdoor protection (HP Reg) for (Attacked unit) to HpRegLvl
- Custom script: call DestroyGroup(udg_HpReg)
- Custom script: set udg_HpReg = null
-
Events
EDIT: the spell is supposed to give health regeneration to the attacked unit based on the number of nearby allied structures.