Passing information from previous game and player states during travel

Hi everyone,

For my game, I want players to first join a lobby where they can vote on the map to be played and any rules to be applied (such as game mode and modifiers). They can also discuss with their team to agree a loadout before readying up. Once everyone is ready, the map and game mode are loaded and travelled to.

My challenge is that the lobby uses a special game mode, game state and player state to store all player choices and game rules to be played. These are called ALobbyGameMode, ALobbyGameState and ALobbyPlayerState. When the server travels to the new map, however, it will be using a whole new set of modes and states depending on the chosen game mode (e.g. ABattleGameMode, ABattleGameState and ABattlePlayerState).

I need to be able to pass on key data from the lobby to the match so that players spawn with their correct loadouts, game mode modifiers, team compositions etc are correctly set up. I looked into seamless travel, but this appears to be geared more towards preserving existing actors from one map to another, however I don’t want to do this: I want to spawn all new actors, but be able to copy over some settings from the old ones.

Does anyone know if this is possible in UE4’s travel system? I can’t seem to find any stage of the travel process where I could inject this functionality, but I might be missing something. Any help would be much appreciated!

Of course, you can do it and there are multiple options. Have fun: Persistent Data Compendium - WizardCell

2 Likes