How to make an automatic door wait 5 seconds before closing when the player is outside the box collision?

Hello everyone! I made a simple automatic door that opens and closes whenever the player comes near it, but I was hoping to design it so that even when the player walks away and out of the box collision for the door, it waits 5 seconds (staying open) before closing. I’ve been trying everything, but I can’t seem to figure it out T_T

Try firing the timeline from events called OpenDoor and CloseDoor or something. Have OnBeginOverlap call OpenDoor directly, and have OnEndOverlap do a SetTimerByEvent with 5 seconds as the time (nonlooping), and drag the red delegate pin from set timer to CloseDoor (or some new middleman event which calls it, so wires aren’t a total mess lol). Delays can be a bit wonky sometimes.

Then from completed pin, check if the direction output =enum Backward or select from it, and if true clear and invalidate timer.

Ignore all the extra math wires flying off screen and the funky BaseRot var. This was on an actor with double doors.

Hello @Feel_The_Bern69 ,Welcome to the forums!

Here’s another option, but I agree with what @illspiritx mentioned.

I recommend using the Set Timer by Event node instead of a Delay, since the latter is mainly intended for simple logic or prototyping. In more complex systems, Delay nodes can be harder to manage and, in some cases, may lead to unexpected behavior.

In general, Set Timer by Event gives you more control over the execution flow. Its main advantage is that the timer can be easily canceled or restarted. For example, in this case, if the player leaves the trigger area and then re-enters within those five seconds, the pending timer is simply canceled, allowing the door to remain open and preventing it from closing unexpectedly.

Hope it helps!