I’ve set up a simple slider and used the OnValueChanged node and hooked it up to my sound, Now my sound plays on event construct and then when the value is changed i link up the float output to the volume Mulitpler, but when i use this slider the sound does not change at all.
Screenshots please
What i think is happening here is
Updating variable wont change the volume of already playing sound.
Details :
- Your sound begins to play with the default value, and wont dynamically change if you change
Music Volume
- If you want sound to change, you must stop current sound, and play new one, with updated value.
Suggestion:
- Make your sound a
variable.(MainMenuSound of type
SoundCue) - Feed it to your play sound
2D - OnValueChanged, try setting a
new volume to your sound
variable (MainMenuSound)
Are you trying to change the volume of a looping sound, or a one shot sound? If looping, the setup would be a little different.
looping sound
You need to make your looping sound an audio component. Change the Play Sound 2D to Spawn Sound 2D and connect your SoundCue to it. Right click on Return Value and promote to variable (this will Set an audio component that you can name however you like). Then get the audio component and connect it to Set Volume Multiplier like shown and it should work.