# How to make ui countdown progress bar

**URL:** <https://forums.unrealengine.com/t/how-to-make-ui-countdown-progress-bar/959258>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [April 14, 2023, 3:12pm UTC](https://forums.unrealengine.com/t/how-to-make-ui-countdown-progress-bar/959258 "2023-04-14T15:12:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dj\_senator](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dj\_senator](https://forums.unrealengine.com/u/dj_senator)\
**Post date:** [April 14, 2023, 3:12pm UTC](https://forums.unrealengine.com/t/how-to-make-ui-countdown-progress-bar/959258/1 "2023-04-14T15:12:15Z")

</div>

hi need your help.

I can’t figure out how to make ui countdown progress bar

There is a pawn class, when the player takes it, there is a countdown, after which it is destroyed, and I need to make a progress bar that the player saw it after how long it is destroyed.

taken from the game

 ![IMG_20230414_180824](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/4/0/040593139595def6f57619823baae4a32b4c26ac.jpeg)

---

<div class="post-metadata">

**Author:** ![EvilCleric](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilCleric](https://forums.unrealengine.com/u/EvilCleric)\
**Post date:** [April 14, 2023, 5:13pm UTC](https://forums.unrealengine.com/t/how-to-make-ui-countdown-progress-bar/959258/2 "2023-04-14T17:13:21Z")

</div>

You have a progress bar widget and a function that takes the max and the current value to set the percentage:

 ![img050](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/9/7/99744334eed379798abdb8f0f0789e145ee0a66a.jpeg)

Then, for example, you start a countdown with a timer:

 ![img051](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/2/1/821b91f2a91c71fa5a28e3f6b9c07267f447a116.jpeg)

---

<div class="post-metadata">

**Author:** ![Mep\_Joss](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mep_joss/32/679067_2.png) [@Mep\_Joss](https://forums.unrealengine.com/u/Mep_Joss)\
**Post date:** [April 15, 2023, 6:03pm UTC](https://forums.unrealengine.com/t/how-to-make-ui-countdown-progress-bar/959258/4 "2023-04-15T18:03:28Z")

</div>

Let’s begin with our setup. You will need a Widget blueprint with a ProgressBar (mine is named _PowerProgressBar_) Sizebox (Width Override set to the desired X value) and a text element parented to it.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/3/6/33605c82aa0782bc7aa6fa26a03f339e095c7d0e.png)  
Note that I’ve gone ahead and added a text binding to the text element. That will come into play later.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/8/c/08c56799c4eff322c220ce948277570cf44ef994.png)  
From here, we will create three variables, two floats to represent the total time the time is capable of being (called _TotalDurration_) and the current time left in the timer (called _TimeRemaining_), and lastly a bool for if the timer has reached ended (called _HasReachedZero_).

Please note that _TotalDurration_ has been set to be instance editable and exposed on spawn.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/9/7/1973361d08e419e639e0d70852e8e1e97038bff7.png)  
Lastly, in the text binding we made earlier, we’re going to want to display to the player how much time is left. To do this is just simple text concatenation.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/0/f/20fac36c4dcf279e87f4513ec3390ebc62b01087.png)  
The end result will produce a flexible timer widget that you can use as you like by setting its duration in any other blueprint.
