Player controller not possesing after swapping
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.
Here is the config of my game modes:
This is the character selection screen gamemode
This is the gameplay gamemode
-------------- 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.
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:
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.
asked Aug 22 '17 at 04:37 PM in Using UE4
Well, in the end, that part of the code was being executed but then, the gamemode will override the pawn created and put the one in the definition.
To solve that, i just removed the pawn class from the game mode and call the event "spawn and possess" in the begin play of the player controller.
answered Dec 01 '17 at 01:06 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here