Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Jarrod84's avatar
Jarrod84
Protege
7 years ago

Proper way to switch pawns after server travel

I'm using unreal to create a match.  The lobby pawns are different than the in game pawns, and we have a lobby room set up for the host and players to wait before the game starts. I set the pawns to spawn and posses the player controller in the PlayerController BP that I have set up, and everything spawns fine in the initial lobby.  The EventBeginPlay only fires in the PlayerController when the map is loaded, and not during server travel.  After the new map is loaded through server travel, the new pawns don't spawn, and the players are left controlling the SpectatorPawns.  I was going to try firing the string I need in the PlayerController from the Level Blueprints, but I'm asking on here because I'm using a Github build and it takes forever to package the game for testing.  I was going to fire the string with a custom event set to Multi-Replicate.

2 Replies

Replies have been turned off for this discussion
  • Sorry about that,

    I'm having trouble loading a playerCharacter from the PlayerController blueprint after serverTravel.  It will spawn the server owning clients PlayerCharacter but everyone else is stuck in Spectator mode.  I messed around with the GameMode, to try and switch from the lobbypawn to the playerCharacter, but I'm still having problems.  I've gone over the UE4 tutorials for their steam networking, but I'm still having trouble.  It seems like I'm not pulling the right PlayerController reference to change the character.  If I figure it out I'll post the answer to my problem.  Does the server view each player as PlayerController0, PlayerController1 and so on?
  • I switched gamemodes on my in game map, and had another playerController blueprint set up the way I wanted it to spawn, and now both owning client and client spawn their character and posses it.