← Learn library

Unreal Engine & Blueprints

Countdown Timer Part 1

Channel: CGI Nerd Unreal Engine ·

Written guide

Original CGI Nerd Unreal Engine video thumbnail
Countdown Timer Part 1CGI Nerd Unreal Engine · Video hosted on YouTube

Playing loads YouTube content. YouTube processes data after activation.

Watch on YouTube

If the player is blocked or unavailable, use Watch on YouTube.

Software: Unreal Engine

This first timer lesson creates a delayed, self-repeating custom event in the side-scroller GameMode and prints its minute and second values. It introduces the control flow for a countdown, but the complete transcript does not include a seconds-reset operation for minute rollover. The short final test shows seconds decreasing; it does not verify a correct full-duration countdown.

The distinction is important when following the series. This article explains the graph built here and the boundary conditions still needing work. The exact Unreal Engine release is unidentified, and no timing-precision or multiplayer behavior is established.

Open the active GameMode and create a callable timer event

At 00:01–03:01, the instructor opens the side-scroller GameMode Blueprint. If the defaults view is missing, Class Defaults is enabled from the Blueprint editor’s Window menu, then Open Full Blueprint Editor exposes the Event Graph.

The GameMode contains the template’s default Pawn, HUD, and related configuration. The demonstration uses the GameMode already configured for the example level; it is not dragged into the scene as an ordinary placed Actor.

A custom event named Countdown Timer is created, then called from Begin Play on the same Blueprint. Defining an event gives the graph an entry point, but something must call it. The Begin Play connection supplies that initial call.

Keeping the countdown under a named event also provides a place to repeat the work later without duplicating the whole graph.

Store minute and second values and delay each update

During 03:01–05:01, two Integer variables hold Minutes and Seconds. The example initializes them to four and 59. The narrator describes this as essentially five minutes; the displayed starting value is actually 4:59, so it should not be represented as an exact five-minute timer.

Countdown Timer passes through a Delay set to one second. On completion, the graph reads Seconds, subtracts one, and stores the result back into Seconds.

The order matters: the delay separates successive updates, and assigning the subtraction result changes the state used by the next call. A subtraction node alone does not update the variable.

This is a delayed event loop rather than a demonstrated elapsed-time calculation. The source does not measure drift, pause behavior, or the effect of starting more than one timer sequence.

Follow the two branches as they are actually built

At 05:01–08:02, a Branch checks whether the updated Seconds value is less than or equal to zero. If it is not, Countdown Timer is called again, leading to another delayed decrement.

If Seconds has reached zero or below, Minutes is decremented. A second Branch checks the updated Minutes value. When that value is zero or below, the graph prints “Your time is up.” Otherwise, it calls Countdown Timer again.

The complete source does not show Seconds being reset to 59 after a minute is subtracted. Without such a rollover operation, the narrated graph can continue with a nonpositive seconds value and reach the minute-decrement branch on subsequent updates. That is a limitation of the demonstrated logic, not a missing step silently supplied by this article.

The minute test also needs to be assessed as part of the full remaining-time rule. A zero minute count is not, by itself, proof that no seconds remain in a general countdown design. This recording does not establish the complete boundary behavior or repair it.

Use a short initial value to inspect those transitions when studying the graph: watch the update before seconds reaches zero, the minute change, and the state on the next call. Treat that as a diagnostic exercise, not evidence that the source already passed it.

Format the current values and understand the final test

During 08:02–11:14, a Print String is placed at the beginning of Countdown Timer so both continuing branches share the same display path. Format Text uses minute and second placeholders separated by a colon, with the two variables connected to their corresponding inputs.

The current value is printed before the next delay and decrement. That placement explains why the output represents the state at entry to the event, rather than a continuously updating clock face.

The final play test shows the seconds decreasing. It does not run through a complete minute boundary or the entire intended duration. No zero-padding of single-digit seconds or dedicated HUD widget is implemented here.

The useful completed foundation is a called custom event, stored integer state, delayed updates, branching, and shared debug formatting. Continue with Countdown Timer Part 2 for the next stage of the series, while keeping this first graph’s rollover and termination limitations visible rather than assuming the word “timer” establishes correct elapsed-time behavior.