- Joined
- Feb 18, 2016
- Messages
- 96
I made this trigger that heal nearby units every time a specific unit (in this case a building) takes damage. The heal is a % of the damage taken for the building and increases by the level of the ability but it does not work
Events
Unit - Treenidad 0030 <gen> Takes damage
Conditions
Actions
Unit Group - Pick every unit in (Units in (Entire map)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Martir Tree ) Equal to True
Then - Actions
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + ((0.02 + (0.04 x (Real((Level of (Ability) for (Building)))))) x (Damage taken)))
Else - Actions
Do nothing
Events
Unit - Treenidad 0030 <gen> Takes damage
Conditions
Actions
Unit Group - Pick every unit in (Units in (Entire map)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Martir Tree ) Equal to True
Then - Actions
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + ((0.02 + (0.04 x (Real((Level of (Ability) for (Building)))))) x (Damage taken)))
Else - Actions
Do nothing