Download

Problem when possesing character after server travel

Hello guys.

I am doing a character selection screen and i want the character selected to be spawn and possessed in the next map, i have been reading all over the forums and I do not know what I am doing wrong. Hope you guys can help me.

NOTE: The character selection screen and the gameplay map have different game modes and different player controllers and also, the seamless travel (in both game modes) is enabled. I am testing it in standalone mode

Here is the config of my game modes:

This is the character selection screen gamemode

character s game mode.PNG

This is the gameplay gamemode

main game mode.PNG

-------------- HERE IS THE DESCRIPTION OF THE PROBLEM -------------------------------

My problem occurs when, in the server, i execute the command ServerTravel [map name]. Like shown in this image.

travel.PNG

Now, when the travel finishes, i have the OnSwapPlayerController event in the game mode. In which I use the old player controller as a reference to get the class, in order to spawn an actor, and possess it by the new player controller like so:
on swap player controller.PNG
47d04affc6e58f6d8b20de2fa142c4d1871f0e96.png

The result is that, the travels goes allright, the selected character gets spawned but, it is not possessed by the new PC, the map default pawn is the one that gets possessed.

Did you manage to fix this issue? If so could you share it please? I am having the exact same issue!

Hello!

Yes, the problem was that the new gamemode of the destination map was already spawning a character automatically. You need to tell your game mode not to spawn a character inmmediately.