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.


Oooo … 4 day bump … no body. 8-{

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.

@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.

Thats the spirit eXi :slight_smile: :slight_smile: