x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

With a listen server, how can I rejoin a client who has travelled to a new level?

Hello, I've got a simple setup with a listen server and a client. I'd like to allow the client player to choose to leave the starting area and load up a new level, and then I'd like to let the listen-server join the client at the new level whenever this player is ready.

If it helps we can say player1 and player2 start in a "base" and there is an interactable door that when used takes you to the wilderness outside. I want player1 or player2 to be able to click use this door to go to the wilderness alone, and then whoever uses the door second, I want them to load into the wilderness that has already been loaded for the other player.

I am testing in the PIE with 2 players.

I can get player 2 to travel on his own no problem with a client travel call, but if I attempt to follow with a client travel call on player 1, nothing happens, which leads me to assume that something prevents the listen server from travelling via client travel, although I can't see this documented anywhere. I've also tried travelling with server travel for the listen server, but this goes to a new instance of that level even though I pass in the URL string I got from player2's NetConnection as the destination for player1.

I suppose I may have an issue with both of my players being at localhost, but I don't have a second box to test this with at the moment, and I'm not sure of a good way to emulate that otherwise. I also just can't find any wikis or answers about existing functionality to let me have my players exist on separate levels, so I don't know if I'll have to wire up some custom communication over sockets to make this work properly.

Please let me know if there is a good way to achieve this, it seems like something most multiplayer games would use, so I'm surprised I'm not seeing anything on it.

Product Version: UE 4.15
Tags:
more ▼

asked Jun 11 '19 at 09:44 PM in C++ Programming

avatar image

Arveanor
23 3 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Ok so after some time away from this I realize the real thing to be searching for was if Unreal supports having multiple levels linked to a server (listen server in my case) and that's been much easier to answer. Based on https://answers.unrealengine.com/questions/375951/multiplayer-one-server-and-many-clients-with-diffe.html I can't have multiple levels open and owned by the server, which of course means there will be no concept of travelling to "level B".

If anyone else finds this and is stuck, depending on your needs you can probably have multiple physical play spaces in one level (probably with level streaming) that your players are teleported between.

It also should be possible to use unreal's network sockets to share some data between both players once they are in separate levels, so that you can still see for example, the other player's healthbar, location (what level they are in), and other relevant info. After this I imagine you can destroy / create sessions as needed and use join session to get to each other's levels instead of something like client travel.

I haven't started looking into unreal's sockets implementations much yet but here's a rama link that should be valuable to get started https://wiki.unrealengine.com/TCP_Socket_Listener,_Receive_Binary_Data_From_an_IP/Port_Into_UE4,_%28Full_Code_Sample%29

Good luck.

more ▼

answered Jun 19 '19 at 03:27 AM

avatar image

Arveanor
23 3 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question