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

**URL:** <https://forums.unrealengine.com/t/how-to-make-an-automatic-door-wait-5-seconds-before-closing-when-the-player-is-outside-the-box-collision/2734670>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [July 9, 2026, 1:51pm UTC](https://forums.unrealengine.com/t/how-to-make-an-automatic-door-wait-5-seconds-before-closing-when-the-player-is-outside-the-box-collision/2734670 "2026-07-09T13:51:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Feel\_The\_Bern69](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Feel\_The\_Bern69](https://forums.unrealengine.com/u/Feel_The_Bern69)\
**Post date:** [July 9, 2026, 1:51pm UTC](https://forums.unrealengine.com/t/how-to-make-an-automatic-door-wait-5-seconds-before-closing-when-the-player-is-outside-the-box-collision/2734670/1 "2026-07-09T13:51:10Z")

</div>

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

 ![Screenshot 2026-07-08 221552](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/7/7/877edf7a848c32d4cfa1342f9ec4f2cd57f43f05.png)

---

<div class="post-metadata">

**Author:** ![illspiritx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@illspiritx](https://forums.unrealengine.com/u/illspiritx)\
**Post date:** [July 9, 2026, 2:07pm UTC](https://forums.unrealengine.com/t/how-to-make-an-automatic-door-wait-5-seconds-before-closing-when-the-player-is-outside-the-box-collision/2734670/2 "2026-07-09T14:07:51Z")

</div>

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.

 ![bp_doors](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/d/b/5db7fc616f4fc506f7f140643303caa7dc0fe930.jpeg)

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

---

<div class="post-metadata">

**Author:** ![BRGEzedeRocco](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/brgezederocco/32/1216890_2.png) [@BRGEzedeRocco](https://forums.unrealengine.com/u/BRGEzedeRocco)\
**Post date:** [July 9, 2026, 4:44pm UTC](https://forums.unrealengine.com/t/how-to-make-an-automatic-door-wait-5-seconds-before-closing-when-the-player-is-outside-the-box-collision/2734670/3 "2026-07-09T16:44:33Z")

</div>

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](https://dev.epicgames.com/documentation/unreal-engine/BlueprintAPI/Utilities/Time/SetTimerbyEvent) 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.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/7/1/e71456dd636c6e87a513145b4d2a603998d7d3f3.png)

Hope it helps!

---

<div class="post-metadata">

**Author:** ![Husky211](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/husky211/32/1193324_2.png) [@Husky211](https://forums.unrealengine.com/u/Husky211)\
**Post date:** [July 9, 2026, 8:53pm UTC](https://forums.unrealengine.com/t/how-to-make-an-automatic-door-wait-5-seconds-before-closing-when-the-player-is-outside-the-box-collision/2734670/4 "2026-07-09T20:53:30Z")

</div>

The only problem I see is that you’re using a “delay” instead of a “retriggerable delay” 👀

---

<div class="post-metadata">

**Author:** ![Rev0verDrive](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rev0verdrive/32/907214_2.png) [@Rev0verDrive](https://forums.unrealengine.com/u/Rev0verDrive)\
**Post date:** [July 12, 2026, 5:45pm UTC](https://forums.unrealengine.com/t/how-to-make-an-automatic-door-wait-5-seconds-before-closing-when-the-player-is-outside-the-box-collision/2734670/5 "2026-07-12T17:45:39Z")

</div>

I use a timer that is triggered by on end overlap. Box collision covers both sides of the door.

When the door is opened I set an enum state to open.

On end overlap I run a switch on state:  
Open → call timer event (Closing delayed)  
Closed → Open door.

Door timeline has 3 events Open door(play from start), close door(reverse from end), reopen(Play).

On completed, if alpha = 1, set door state Open, else Closed.

Event ClosingDelayed: set timer by event (CloseDoor)-\> set handled.

On begin overlap: is timeline playing[true]

Switch on DoorState  
Open (we are closing) → ReOpen , clear timer handle  
Closed (we are opening) → do nothing, door is already opening.

Else [false] → OpenDoor

---

<div class="post-metadata">

**Author:** ![Feel\_The\_Bern69](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Feel\_The\_Bern69](https://forums.unrealengine.com/u/Feel_The_Bern69)\
**Post date:** [July 13, 2026, 6:07pm UTC](https://forums.unrealengine.com/t/how-to-make-an-automatic-door-wait-5-seconds-before-closing-when-the-player-is-outside-the-box-collision/2734670/6 "2026-07-13T18:07:35Z")

</div>

Thank you all so much! You’re exactly right; the delay was what the problem was, and replacing it with a Set Timer by Event was what I should have been doing from the start. It works like a charm 😄
