Delay after begin overlap

Hey,
The title says it … After a Begin Overlap event is triggered, I want to wait few seconds before doing other actions. I tried with a simple " print string " after the delay but it is never executed …

Can you show the code?

I think I better give some extra details x)
I have a character and a box in my level. Whenever the player walks in that box, it changes few materials. I can do that but I don’t want the character to instantly change its materials ; the goal is to do it after a delay of 2 seconds, and it doesn’t matter if the player is still in the box or not after the delay.

Hello Idknoidealol (it’s possible to change your forum username if you come up with something ;-)),

I set your logic up in a BP and everything is working as expected.

One thing that might help - you can watch the execution of a BP while you are playing - Just have the BP Event Graph window open while playing and you’ll see the logic fire + delay timers. (If you only have one instance of this BP it should automatically select it, if not there is a drop-down in the upper right that will allow you to select the right instance)

Hope that helps.

1 Like

(I’ll think of a new name haha)
Hold on … How did I not know about this trick ? :’)
I tried your ‘’ thing that might help ‘’ and it worked great for a blueprint but I don’t see the logic running when trying with another. What dropdown are you talking about ?

Don’t use delay in this case, it will overload memory if you will enter/out multiple times in the box while the old traces are still exists as a posponed response.

Use a progress bar with a delay time while the box is ative and destruct the progress bar when the box is deactivated… it wil automatically clear the memory when you don’t need the posponed calls in the memory.

Anyway the bp logic is working as expected, I just show something happening out of the box in the background.

Glad to hear it. Attaching screenshot of the dropdown I mentioned:

Also remember that if you are playing in-editor you can press Shift + F1 to regain control of the mouse cursor. (Useful for when you want to click in BPs while playing)