Need Help with HUD, Countdown Timer music change when time is almost out

Hi everyone,
I need help trying to figure out how to speed up my in game background music or change the music in my game when time is running out.
I’ve gotten the HUD to countdown and kill the player at 000, I haven’t found a tutorial on how to do this and am stuck. Hopefully you can help me.
I have a Widget with the Score, coin count and timer.

Hey @Ciezzz!

So first, let’s set the 2d Audio component in game mode to be a variable so it can be called:
image

Then you’ll want to add in a check on your widget that is after the <= Branch, and off of false, check if the integer = 100 or whatever time you want to speed up at. If THAT is true, Get GameMode, Cast to your game mode, and get that 2d Audio Component variable you just set.

After that you’ll have to pitch up the music to speed it up and pitch down the music again (to original value, without slowing it) using metasounds.

Here’s a link to a good walkthrough on how to do so!

Disclaimer: This link is not associated with Unreal Engine, Epic Games, or their partners.

1 Like

Thank you so much! that worked!!! and Thank you for the clear instructions, i was getting frustrated. To the point that I almost gave up, hence the late reply.

1 Like