IA_Pause Turn Off Spawn 2d Sounds (or fade it out quickly)

I want my pause button, through IA_Pause to stop my 2d spawn sound. Thought this should work. Why is my EnhancedInputAction IA_Pause not triggering a stop on audio?

Somethings not working in the IA_Pause, is there a different way I should have the white line?

My pause is built into the BP_ThirdPersonCharacter Blueprint, and the audio is in my PlayerStart_Blueprint if that makes a difference?

I have checked, the Stop function works, but the trigger coming from EnhancedInputAction IA_Pause isn’t triggering the Stop function. Tried Triger, Start, and Complete white outputs and they were’nt working

Ignore this is extra script, although extra info if needed?

Hi!

Have you set up this PlayerStart_Blueprint to receive inputs? You could either use the Auto Receive Input property in its class defaults, or do something like the following:

Either of those solutions should work but please note that it’s generally recommended to put all input handling inside a Player Controller. You could then, for example, call a pause function in your game mode/state to handle the audio stuff.

Hello @ataribox007 ,
What exactly is the PlayerStart_Blueprint? Either way, this shouldn’t be an issue, since you should be able to stop the sound from another Blueprint as well.

Although, as @lucas_kokku mentioned above, IA_PauseSound could be implemented in the Player Controller, it should also work correctly from BP_ThirdPersonCharacter.

You can try the following:

First, create an IA_Pause. For this example, I’ll call it IA_PauseSound. Make sure to enable Trigger When Paused, since we need the Input Action to keep detecting the input even when the game is paused.

Then, add it to your IMC_Default or whichever IMC you’re currently using, and assign it to the key you want. Under Triggers, add Pressed.

I recommend using this setup because it’s a good Enhanced Input practice: it allows you to define different behaviors and conditions for the same key, depending on the Input Action it’s associated with. This gives you more flexibility when managing your inputs.

When you want to stop the sound, add an Is Valid node before calling Stop. This way, you make sure the audio reference is valid before trying to stop it.

With this setup, it should work correctly.

If it still doesn’t work, could you show a bit more of where and how you’re creating the sound?

It would also be helpful to know whether you want the sound to pause when you open the pause menu and resume when you return to the game, or if you want it to stop and be destroyed permanently, or what exact behavior you’re trying to achieve.

Another thing that comes to mind is that you might be calling this sound multiple times, meaning that when you call Stop, you’re only stopping the most recently created instance.

Hope it helps!

does it matter if it’s sequenced call? (inside playerstart blueprint)

IA Pause is setup, but it’s not triggering a pause within my playerstart_blueprint

tried to add the thing you suggested,
no trigger coming out of EnhancedInput IA_Pause.

I tried a different chain from a delay on begin play directly to stop, and stop is working. No trigger coming out of IA_Pause within playerstart_blueprint

nothing coming out of this box in payerstart_blueprint when i push pause… (tried all the white pegs)

although it is triggering chain within thirdpersoncharacter blueprint

I would assume it should trigger something in any blueprint?

Only controllers and pawns/characters are automatically configured to trigger inputs. Other classes need to be manually set up to receive inputs like I mentioned. Have you tried either the Auto Receive Input property or the Enable Input method from my previous reply?