Trigger One:
Events:
Every 2 seconds of game time
Conditions:
Actions:
set IntegerVariable=0
Trigger Two:
Events:
A unit is attacked
Conditions:
Attacking unit equal to (yourherohere)
Actions:
Set IntegerVariable=(IntegerVariable + 1)
If IntegerVariable is equal to 4
Then
Set IntegerVariable=0
Turn off Trigger One
(Do the actions you wanna do)
Else
Turn on Trigger One