I created Pause menu and it works but the music keeps playing if the game is paused
You did not specify how you’re playing music, but you can pause it:
There are many ways, depends on the details - provide some if you need extra help.
see the code
Set it to paused, just like in my original post.
i want when i press p then audio stop and pause menu open
Use the Chasing Music reference variable to pause the audio.
how to use i dont know
where to paste this code
You have a blueprint that handles game pausing. That BP should access the AI BP that plays the audio and pause it. It’s impossible to give you a direct example since we know nothing about what you’re making.
let me try
can i do this in new blueprint
Not sure I understand. The AI Char is playing the music. Access it and pause it.
But, tbh, the whole music playing should not be in the AI BP to start with. Consider the following:
- implement playing the Chase Music in the Game Mode
- chase starts → get Game Mode → play music
- pause the game → get Game Mode → pause music