Switch between two sounds

I’m really sorry to ask this question, but it’s an urgency.

Simply , i just want that my sound change according to my variable “Terro”.

When my variable is false , it’s work my “Ambiance” music is play and my “Angoisse” music is stop, but when my variable is true , it doesn’t work , like my variable was always false … but I have verified and she becomes “True” on my character… If someone help me quickly ^^""""" (sorry)


It is because you are using the EventBegin play. It means that will happens once, when the game starts and no more!

Use event tick instead, it will update every frame.


Already try and it doesn’t work too. It’s doesn’t play musics , that my variable is true or false …

ok, but what is updating your variable “Terro”?

another thing, the sound actors are inside your level? if yes, check if they are marked as auto active… if they are, uncheck that

By Default my variable Terro is disable, and when my character approaches an object like a washing machines, his animation changes et his variable Terro become True …

ok, but when the variable becomes false?

Once it becomes true ,it will never go back to false if you do not order it.

And the sound actors can´t be settled to auto active.

The sounds are in the scene and their auto active are disable.
But I don’t understand, in my blueprint , I say my order no ? When my variable is false then you play this sound otherwise you play this other music . It’s not correct ?

ok, let me explain better

The variable is false, in the beginning of the game it will play the soud that is in false logic.

When you get close to the washing machines, it becomes true and plays the sound that is in true logic. But the variable now is set to true, you need to tell the engine to settle the variable to false, you can use a logic that when you are far away from the washing machines, the variable now becomes false.

Ok; i will try something… I keep up to date… I don’t know if it’s work but thk for your quick help…

ok, if it works please mark as resolved, if note, come back and we will find a solution!

good luck

Well , a friend finds the solution

You can add the two sounds you want to switch between inside your SoundCue.
In the sound cue, add a Switch and give that switch a parameter name. Hook up the Wavs to the integer inputs then save.
You can the grab the SoundCue in level blueprint and use Set Integer Parameter to make the SoundCue switch between your two sounds (or multiple sounds if you want more).