Problems Minigame Multiplayer

Hi, I’m making a mulitplayer minigame and I’m stuck with something.
This is my situation:
I have 3 Different Maps with 3 Different GameModes

  1. MainMenu Map and MainMenuGameMode: Show menu to host and join sessions
  2. Lobby Map with LobbyGameMode and LobbyPlayerController: Selection of character (each player can only selects 1 character)
  3. GameMap with GameMode and GamePlayerController: Main Game.

When a player connects to a session, and goes to the lobby, it selects a character. When all the players selects a character, the server travels to the GameMap with Seamless Travel. (I’m using onlineSubsystem Steam for all of this)

My problem is when I travel from Lobby to Game. I don’t know how to make the selection of character persistent (I’ve got a Enum with type of character).
I was using PlayerStatus to store it but in GameMap it comes not selected.
I read that the GameInstance is a good place to do this logic but I don’t know how.

Related to this example, I’ve got a couple of questions:

  • It is ok to have different GameModes and PlayerControllers (I’m trying to split funcionality) or should I stick with just 1 PlayerController for all games.
  • I want to spawn and possess the character selected according to the character selected in the lobby, where should I do this tasks? Should I give the PlayerController this task or other place?

Thanks in advance

How were you trying to do it before and what don’t you know about doing it via the game instance? I would imagine it’s largely the same.

Well if it’s a different game mode then yes. Not sure about why you would need a different player controller though. How fundamentally different would it be? What logic are you doing there?

Sounds reasonable to me.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms