Match Countdown Clock / Widget Display

I’ve recently looked for information on how to setup a match countdown clock like you would see in a CTF game or Sports Game and came up with not-so-elegant results.

Let me post my solution.

  1. Setup a Variable in Game Mode called MatchTime as Interger, this would be Minutes,
  2. Setup in Gamestate it takes that converts it to seconds and then works with it.
  3. Set the Display output of the time after its manipulated to replicate so a Widget can display it to all clients.

[Event Begin Play]

[Function in GameState called on Tick with a delay of 1 second.]

(note forgot to hook up one boolean oops! :P)

[Widget Construction to display time Remaining.]

[Widget Get Time to display]

[Example in game normal time, which is ticking down.]

82610-normaltime.png

There are some game specific booleans in this example to deal with overtime and end match state. I am wondering if anyone has better ways of accomplishing this? I hope someone finds this useful as i might have.

Video of this in action…