Overlap event to work with a 3 second delay

Hi everyone, I’m not sure if my titles makes sense so ill try and explain a bit.
I have an OnComponentBeginoverlap event where when one actor(A), overlaps the other actor(B), im changing the material color of the actor(B)…

This happens instantly, however, I want to set it so that Actor(A) has to be overlapping Actor(B) for 3 seconds before the material change occurs to actor(B). And if Actor(A) doesn’t stay overlapped for 3 seconds nothing will happen to actor(B).

Does that make sense or was that very confusing.

Any push in the right direction would be great thanks!

Set a bool, say Overlapping to true on the Begin Overlap and fire a timer for 3 seconds, look at the bool and if it’s true change your material.
In the End Overlap set the bool to false.

If overlapping end was less than the 3 second timer then it will be false when it checks.

This is just a quick pass. There will be issues such as other actors causing it, and you could clear the timer out on the end overlap, but it should work in the simple case.

Awesome worked perfectly!!! thanks!!