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
- MainMenu Map and MainMenuGameMode: Show menu to host and join sessions
- Lobby Map with LobbyGameMode and LobbyPlayerController: Selection of character (each player can only selects 1 character)
- 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