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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

PlayerController not changing at servertravel

Hi,

I am having some issues when a new map is loaded : I didn't understand why the authority never got a player controller. Now I found out that my playercontrollers are not updated. What I mean is that I have 2 different playercontrollers and there need to be a switch when the new map is loaded but there is none. I set the gamemode, controller, etc in the editor in "world settings".

Is there a way to fix that ?

rXp

Product Version: UE 4.8
Tags:
more ▼

asked Jul 06 '15 at 08:29 AM in Bug Reports

avatar image

rXp
311 22 17 39

avatar image eXi Jul 06 '15 at 09:06 AM

So you have 2 different GameModes for the two maps you are traveling from and to?

avatar image rXp Jul 06 '15 at 09:09 AM

Yes, is that a problem ?

avatar image eXi Jul 06 '15 at 09:15 AM

Nono, that is correct. I just wanted to make sure that you have that setup.

Are you also sure that the second GameMode is overriding the first one in the new map settings? You need to set a global GameMode for your maps and then only override this one in the other maps. The options to override can be found under "Blueprints.." in the top bar of the Editor when you have the map, that you want the new GameMode for, opened. Also make sure to rightclick the map file and hit "save". I had problems with my gamemode getting reseted all the time, because it didn't save correctly.

avatar image rXp Jul 06 '15 at 09:20 AM

I have a Project Settings setup and for each map a World Settings setup too. Lobby map : alt text InGameMap : alt text

avatar image eXi Jul 06 '15 at 09:45 AM

Ok so far so good. I will toss in some more question to find the source of the problem.

You are using ServerTravel ConsoleCommand right? Do you have "Seamless Travel" enabled in the GameMode Default Settings? If yes, would you mind turning that off and check if it is working then?

If not, can you print the DisplayName inside of both PlayerControllers on BeginPlay and double check that, after the ServerTravel, the PlayerController did not update? The best would be limiting this to the Server versions of the PlayerController by using a SwitchHasAuthority node (:

avatar image rXp Jul 06 '15 at 10:27 AM

Yes I use seamless travel and I unchecked it on every map but then my clients never manages to load the map (no OnPostLogin and no Event BeginPlay in the map BP). On the other hand the server does have a controller without seamless travel even if the clients cannot connect.

As for the name printing, I was already doing it "player x connected to the server" when a client connects.

avatar image rXp Jul 07 '15 at 09:21 AM

Hi back, after fixing an issue I had with the editor I manage to test without seamless travel and it works. Both gets a controller and (with my code updated) they both load the map correctly.

Now I could do without seamless but it is not optimal and not recommended by Epic so what could keep my authority to get a controller with seamless travel ???

avatar image eXi Jul 07 '15 at 12:51 PM

Who said that you need seamless travel? You will only need seamless travel if you want to keep some classes alive over the level change and have a transition level. If you don't need this, you can simply not use this.

I haven't worked with seamless travel yet, so i don't know why and what is causing this.

avatar image rXp Jul 07 '15 at 01:01 PM

I actually keep important gameplay data between maps. I could keep them in each gameinstance but that's just wanting someone to cheat xD I could make a system where all playerstates are replicated in every clients' gameinstance and the server keep the playerstates with the most count. (a player can only cheat on his gameinstance but if the 5 others players have a same different playerstate then they are right because they are more)

avatar image eXi Jul 07 '15 at 03:04 PM

Ok, for this you would really want to keep the data (as long as you have no workaround). I though about saving the data on the GameInstance of the Server. That way, no one can cheat (despite the listen host, but he can cheat anyway). This would need a lot of saving back and forth. sadly, i have no idea how exactly the Seamless travel works. I only had problems with it and i know that there are tons of bugs the last time i asked someone from epic about my own seamless travel bug.

avatar image rXp Jul 07 '15 at 04:02 PM

It its not fixed but you gave as good an answer as there is. Thank yoi

avatar image Ben Halliday STAFF Jul 08 '15 at 08:52 PM

Hi rXp,

Just to make sure I'm understanding you correctly:

  1. You're using Seamless Server Travel to move between levels, and the problem you're facing is that the controller is not switching to the appropriate controller for the new level after travel?

  2. Does this happen on the Server or on the Client, or both?

  3. Do you have an Transition level set up for Seamless travel?

  4. What GameMode do you use as the Default GameMode? Is it the MainMenu GameMode?

Thanks! I'd like to reproduce the problem here but I need these details. If you're able to reproduce this in a small test project (with no Starter Content), you can attach that here and I can look into that as well.

And just to make sure you've seen it, here's the Docs on Travelling in multiplayer:

https://docs.unrealengine.com/latest/INT/Gameplay/Networking/Travelling/index.html

avatar image rXp Jul 09 '15 at 05:56 AM

Hi,

1) Yes but only for the authority.

2) Server

3) Since the doc said that leaving it empty creates an empty map that's what I did.

4) Default gamemode is the MainMenuGameMode that also contains the logic for the Lobby.

I will try to reproduce this issue on a small project with just connection to a session and travelling.

avatar image rXp Jul 09 '15 at 07:53 AM

Hi,

Look at the screenshot below : You can see that after the new gamemode loading (said "loaded" because the event beginplay is called) the players connects and controller are given to them. And as you can see one of them as the MainMenuController.

alt text

How may I upload the project ? It is still 30mb after removing saved intermediate build etc. I could delete everything in the map if you want.

avatar image Ben Halliday STAFF Jul 09 '15 at 02:38 PM

Nah, that's fine. If you could zip it up and upload it somewhere like Google Drive or Dropbox, and get me a download link, that'd be easiest. Thanks!

avatar image rXp Jul 09 '15 at 04:07 PM
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey rXp,

Thanks for the project! I was able to reproduce this issue, and I've reported it as UE-18413. I'll let you know when I see any update on it.

Unfortunately, as eXi mentions, there are multiple problems with Seamless Travel at this time. I'll look into a workaround, but it seems like working without Seamless Travel is the best option for now.

more ▼

answered Jul 09 '15 at 09:33 PM

avatar image rXp Jul 10 '15 at 04:27 AM

Thank you :) Now I can stop obsessing over that issue ^^

avatar image Davixe Jun 06 '16 at 11:29 AM

Hi! I'm facing a very similar problem right now. I got everything working well with seamless travel on previous versions, but in 4.11 and 4.12 the player controller is not changing anymore, ¿is there any change in the way we need to travel to the new map?

avatar image Rudy Q ♦♦ STAFF Jun 09 '16 at 05:51 PM

Hello Davixe,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?

  2. If so, could you provide a detailed list of steps to reproduce this issue on our end?

  3. Could you provide screen shots of any blueprints that may be involved with this issue?

(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