# Loop at BeginPlay when I load a map

**URL:** <https://forums.unrealengine.com/t/loop-at-beginplay-when-i-load-a-map/456553>\
**Category:** Audio\
**Tags:** dedicated-server, beginplay, unreal-engine, loop, question\
**Created:** [October 7, 2019, 10:14am UTC](https://forums.unrealengine.com/t/loop-at-beginplay-when-i-load-a-map/456553 "2019-10-07T10:14:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ValentinAnsart](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ValentinAnsart](https://forums.unrealengine.com/u/ValentinAnsart)\
**Post date:** [October 7, 2019, 10:14am UTC](https://forums.unrealengine.com/t/loop-at-beginplay-when-i-load-a-map/456553/1 "2019-10-07T10:14:21Z")

</div>

Hi guys !

I’m having an issue using Event BeginPlay. I’m trying to connect to a dedicated server 10.xx.xx.xx right when the game starts by executing the open console command. But when I launch the server, everytime the command is executed, BeginPaly starts again and i’m looping.

How can I managed to connect to my dedicated server only once when i’m starting my game ?

Thank you !

 ![289410-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/c/a/5cad7ff95cffc000e64a327b86264a5830a52a67.png)

---

<div class="post-metadata">

**Author:** ![BlueMind\_Studio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BlueMind\_Studio](https://forums.unrealengine.com/u/BlueMind_Studio)\
**Post date:** [October 7, 2019, 12:06pm UTC](https://forums.unrealengine.com/t/loop-at-beginplay-when-i-load-a-map/456553/2 "2019-10-07T12:06:23Z")

</div>

run two seperate maps. the startup map contains the code for the openLevel command and the server runs the original map

---

<div class="post-metadata">

**Author:** ![ValentinAnsart](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ValentinAnsart](https://forums.unrealengine.com/u/ValentinAnsart)\
**Post date:** [October 7, 2019, 12:37pm UTC](https://forums.unrealengine.com/t/loop-at-beginplay-when-i-load-a-map/456553/3 "2019-10-07T12:37:41Z")

</div>

Thanks a lot ! Make a startup map didn’t come to my mind

---

<div class="post-metadata">

**Author:** ![BlueMind\_Studio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BlueMind\_Studio](https://forums.unrealengine.com/u/BlueMind_Studio)\
**Post date:** [October 8, 2019, 5:39am UTC](https://forums.unrealengine.com/t/loop-at-beginplay-when-i-load-a-map/456553/4 "2019-10-08T05:39:18Z")

</div>

No Problem 😉 you could also Work with commandline Flags and react in that in your BP. If it works for you, please Mark the answer as correct so the question is marked AS solved
