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"

PlayerState gets removed and Hosting / Joining session fails

From ShooterGame example, placing a level that the player and player controller are in between the front end menu and the map that the player travels to from hosting a session, causes the player state to be nuked or replaced, and causes issues with Hosting and Joining the session.

Even if the interim level overrides the player controller class and the game mode, this still occurs.

The interim level is loaded via a URL browse: GetEngine()->Browse

Then the player chooses to host a session and it 'seems' to work and the player travels to the host map.

When the other player travels to the interim level, and tries to 'search' for a hosted game, the session appears but the number of players shows as 0 ( zero ), even though the host is hosting it.

When the joining player joins that session, he fails to load into the level ( becomes stuck in the loading screen ).

The player state for the host becomes corrupt or deleted when they host a short time after entering the level. It seems to have something to do with trying to persist the player state from the last level.

Question: How can a session be cleanly hosted from an interim level in which a player pawn and controller exist, ,and not corrupt the player state of the player or non-player pawns, and how can the session be hosted and joined successfully?

Product Version: UE 4.15
more ▼

asked Mar 24 '17 at 04:13 AM in C++ Programming

avatar image

41 4 7 7

avatar image COMPR3SSION Mar 24 '17 at 10:10 PM

So the sequence of events is: Player lands at menu ( and is player controller menu ) Player is browsed to another level where the game mode is different and the player has a controller and pawn so they can walk around and do things Player hosts a session, and travels to that session...the game mode is different in the new session. The player controller and pawn class are the same After a couple seconds, the player states are wiped on the server in the hosted map * Another client, when trying to join the session of the first, will see the session listed, but it will say '0' ( zero ) players active in the hosted session

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

1 answer: sort voted first

Here is the fix. In your Game Mode for your player base / interim level / player housing whatever it is....

Set this to false in the class constructor. bUseSeamlessTravel = false;

more ▼

answered Mar 25 '17 at 04:35 AM

avatar image

41 4 7 7

(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