Announcement

Collapse
No announcement yet.

Set a game time in the lobby menu that carries over to game mode in the next map

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Set a game time in the lobby menu that carries over to game mode in the next map

    Hi, I've setup a lobby system that lets a host change maps and set the game time, I've also setup a timer count down system in my game play game mode, what I need to figure out is how to get the time input that gets set in my lobby to affect the start minute and start second variable in my game mode. Currently the way the lobby travels to that map is via console command so I don't think there is a variable slot I can plug in. I am thinking if I can do it via saving a struct like I'm currently doing for player information but I'm not sure if theres a way that is more simple.
    Last edited by stokesy96; 06-13-2020, 09:12 AM.

    #2
    I might be misunderstanding , but if you just want something to persist between levels the game instance is commonly used. there is a getGameInstance() node and you can redifine the primary game instance by making a blueprint and assigning it in Project Settings > Maps and Modes

    Comment


      #3
      I'm making a match based multiplayer game so I'm trying to save the Game instance only for the overall navigation. What I needed was a way for the host to define how much time a match was going to last for in a lobby and for that information to go through to the matches game mode which then filters into a game clock on the players UI.


      I have managed fix my issue by using structures like I thought of using in my first post. I've followed this tutorial series to get to this point: https://www.youtube.com/watch?v=abmz...KsRg6fpxWndZqZ and what I did was use the same structure the guy uses to carry player information around to carry match information between gamemodes.

      Comment


        #4
        You can pass Options when calling OpenLevel. Get the option in the next map GameMode and replicate it in GameState for everyone to see.

        Comment

        Working...
        X