Vigyata.AI
Is this your channel?

Unreal Engine 5.1 Endless Runner Tutorial - Part 10.2: Powerup Progress Bar

3.9K views· 10:45· Sep 15, 2023

🛍️ Products Mentioned (7)

Welcome back to part 10.2 of our tutorial series for creating an Endless Runner game in Unreal Engine 5.1! In this video, we'll show you how to add Progress Bar Timer for Powerup and Update it. Watch Part 10.1 here: https://youtu.be/Y4lMV8Uf0lk Assets: https://bit.ly/3pCAXJ7 Note: Before using any of the assets, please make sure to read the Readme file provided. Get the Endless runner project files here: https://shop.shivadev.com/b/erprojectfiles Note: The project files are constantly updated to reflect the latest tutorial in the series. Stay Connected: Discord: https://discord.gg/zFZ43Hjs3R Twitter: https://twitter.com/shivasgaming75 GitHub: https://github.com/Shiva9168 Instagram: https://www.instagram.com/shivas_gamingzone/ Portfolio: https://shiva9168.github.io/ Email: shivasgaming75[at]gmail.com Support Me: Patreon: https://patreon.com/shivasgaming PayPal: https://paypal.me/Shivasgaming Help me make more content by donating! 00:00 Disclaimer 00:14 Introduction 00:40 Setting Powerup Timer 02:17 Creating For Loop With Delay 04:40 Decrease Powerup Timer 06:59 Creating Progress Bar 10:36 Outro Track Title: Tranquility Music by: TeknoAXE Music Link: https://youtu.be/08ddPOJnTL4 // Ignore the tags below. They are provided for reference purposes only. Tags: #gamedevelopment , #unrealengine5 , #animation , #powerups , #endlessrunner , #Subwaysurfers , #tutorial , Endless Runner Tutorial, Game Design, Game Programming, Game Tutorial, Indie Game Dev, Game Development Series, Endless Runner , Game Development for Beginners, Game Development Tutorial, Game Development Step-by-Step, Game Development Walkthrough, 3d Character, unreal character

About This Video

In Part 10.2 of my Unreal Engine 5.1 Endless Runner series, I add a power-up timer progress bar to the HUD so you can clearly see how much time is left before the Magnet deactivates. I start by creating a float variable called “Magnet Timer” in BP_RunnerGameMode, then I wire it into BP_PowerUp_Magnet right after I activate the magnet. The key idea is simple: whatever your magnet duration is, I set the timer to that value + 1 second, so the countdown logic stays clean and predictable. Next, I build a custom “For Loop With Delay” using a Blueprint Macro Library, because the default For Loop doesn’t support ticking down over time. Inside the magnet blueprint, I run that loop once per second, decrement the Magnet Timer, clamp it using Max Float so it never goes negative, and print the value to confirm it’s working. Finally, I create a Progress Bar in Gameplay_UI and bind its Percent to a function (Get_Magnet_Percent) that reads the timer from the GameMode and divides it by the correct value (I use 5 when my timer starts at 6). I also fix the progress bar getting stuck by increasing the magnet deactivation delay by 0.2, and I hide/show the bar using Event Tick + Is Magnet Active so it only appears when the magnet is actually running.

Frequently Asked Questions

🎬 More from Shiva's Gaming Zone