So I followed up the tutorial for creating a simple Main Menu but the only problem is that my game is meant to be multiplayer…
I tried changing the “Open Level” node but couldn’t find a way to make it work.
When I press the “Play Game” button it loads the map but it seems that each client is loading it’s own map rather than connecting to the server, and if I change the “Open Level” node to the specific IP I get a black screen. Any ideas?
I’m planning on hosting the server in AWS, so I’m using dedicated server.
I’m pretty new to working on Unreal Engine with multiplayer, so if anybody can point me to the right path I would be grateful.
Do not be worried at all about not knowing enough about multiplayer, the current documentation isn’t great.
Basically open level opens a level on the client but doesn’t join any game with another player. What you need is a session system, and it’s quite simple.
On your open game button event, make a ‘create session’ node and apply the settings that work for you like the LAN checkbox, and set player controller to ‘get player controller’. On the ‘on success’ pin make an open level node. This next bit is REALLY IMPORTANT, under open level click to show more settings and set the options to ‘?listen’.
You have now created a session.
To join, on your join event create a find sessions node, do the same player controller and set the max results. On the ‘on success’ pin create a join session node, same player controller and use a ‘get a copy’ to put the search result array into the session to join. You do not need to add a open level.
And your done! If you want to have a lobby or just move all clients to a new level that are already in the same session, use a ‘execute console command’ node, and append the words 'servertravel ’ and your map name e.g LobbyMap, remember the space between servertravel and map name.
I’m going to stay subscribed to this so please tell me if this works or not and if it doesn’t I’ll try to help!