Announcement

Collapse
No announcement yet.

Networked Enabled Game Duration Timer...

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

    Networked Enabled Game Duration Timer...

    What is the best way to make a Networked Enabled Game Duration Timer?

    Basically I need to have the game server countdown from 5 minutes and ensure all clients have the same time and any new clients that connect after the time has started to get the correct time. Ideally I would like to set whether the game timer counts up or down and I would like to fire warnings with like 1 minute to go ... etc.

    I have dabbled with a few ideas and can't really find a solution that will work ... so anyone who can help point me in the right direction will have my gratitude.

    Thanks
    Quinton Delpeche
    Founder - Gobbo Games | Designer - The Colony 2174 (Board Game) | Developer - Riders of Asgard

    #2
    Oooo ... 4 day bump ... no body. 8-{
    Quinton Delpeche
    Founder - Gobbo Games | Designer - The Colony 2174 (Board Game) | Developer - Riders of Asgard

    Comment


      #3
      Maybe store the Timer in the Controller, make it replicated and let the server set it per tick combined with deltatime?
      When you set the Timer variable to "OnRep", you can handle the Warnings etc in the OnRep function. They are called
      on the client, so it should be easy to display a widget when 1 min is reached or something.
      Open for contracted work | C++/BP (incl. Multiplayer) | Tutoring | VR

      My UE4 Blog/Page with Tutorials and more: Hit me for ALL the things!
      (Including 100+ Pages Multiplayer Network Compendium to get you started.)

      Comment


        #4
        @eXi: Okay cool ... will give that a try ... just wasn't sure if there would be some drift using a Timer. Thanks.
        Quinton Delpeche
        Founder - Gobbo Games | Designer - The Colony 2174 (Board Game) | Developer - Riders of Asgard

        Comment


          #5
          Originally posted by qdelpeche View Post
          @eXi: Okay cool ... will give that a try ... just wasn't sure if there would be some drift using a Timer. Thanks.
          Hm, na, you could also try saving it in the GameState. Could also be the more fitting class for this, but in the End, it makes no real difference as long as
          it is working.
          Open for contracted work | C++/BP (incl. Multiplayer) | Tutoring | VR

          My UE4 Blog/Page with Tutorials and more: Hit me for ALL the things!
          (Including 100+ Pages Multiplayer Network Compendium to get you started.)

          Comment


            #6
            Originally posted by eXi View Post
            it makes no real difference as long as
            it is working.
            Thats the spirit eXi
            Im an Moderator on UnrealSlackers Discord! Which is a Community driven group of likeminded people here to discuss UE4! Join UnrealSlackers on Discord!

            Comment

            Working...
            X