If actor overlaps or collides for 5 sec's trigger action

Can you make an actor do something if it has collided for a certain amount of time like if two actor's come together and stay together for 5 seconds for example then 1 actor gets destroyed
but then if they seperate before 5 seconds the time resets untill they collide again, i'm just not sure how to put this in a rule.
but then if they seperate before 5 seconds the time resets untill they collide again, i'm just not sure how to put this in a rule.
Comments
---Timer; after 5 seconds, Destroy
That should be all you need.
Create an integer attribute called 'isTouching'.
Leave it set to 0.
Then two Rules, like this:
Rule
When all conditions are valid:
Actor overlaps or collides with Actor of Type [whatever]
-----Timer Every 1 second
----------Change Attribute: self.isTouching To: self.isTouching + 1
otherwise
-----Change Attribute: self.isTouching To: 0
Rule
When all conditions are valid:
self.isTouching = 5
-----[do something]
Don't use run to completion on the Timer.
That should do the trick!
EDIT: ahh FireMaple beat me