# Run OnBeginOverlap more than once

**URL:** <https://forums.unrealengine.com/t/run-onbeginoverlap-more-than-once/339056>\
**Category:** Audio\
**Tags:** while-loop, unreal-engine, loop, sequence, Blueprint, question\
**Created:** [November 19, 2015, 9:26pm UTC](https://forums.unrealengine.com/t/run-onbeginoverlap-more-than-once/339056 "2015-11-19T21:26:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_0e3d41b3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0e3d41b3](https://forums.unrealengine.com/u/anonymous_user_0e3d41b3)\
**Post date:** [November 19, 2015, 9:26pm UTC](https://forums.unrealengine.com/t/run-onbeginoverlap-more-than-once/339056/1 "2015-11-19T21:26:43Z")

</div>

I am trying to devise a door that will work for my entire gameplay. This door will turn on a bool on my player which will allow me to fire a key.

When I fire that key, If I am still in the collision, it will play the animation to open the door and then the player will head inside.

The problem is that when I fire the key to open the door the sequence will have finished already and therefore my player will not open the door.

I have tried with while loop and forloop but I can#t seem to find the solution.

Any suggestions?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [November 20, 2015, 11:20pm UTC](https://forums.unrealengine.com/t/run-onbeginoverlap-more-than-once/339056/2 "2015-11-20T23:20:25Z")

</div>

Hello ,

One way would be to use the Get Overlapping Actors Of Class node on the collision volume. Although, you shouldn’t have an issue if I’m understanding you correctly. If you’re setting the boolean to true that allows the player to start this sequence in OnBeginOverlap and not setting it to false, you should be able to without issue.

Are you setting the boolean to false after a set amount of time? If so, I’d suggest setting it to false when the OnEndOverlap event is triggered instead.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0e3d41b3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0e3d41b3](https://forums.unrealengine.com/u/anonymous_user_0e3d41b3)\
**Post date:** [November 25, 2015, 2:29pm UTC](https://forums.unrealengine.com/t/run-onbeginoverlap-more-than-once/339056/3 "2015-11-25T14:29:47Z")

</div>

I used a tick instead and booleans as solution, thanks!
