Set value for audio volume slider

Hi all,

I’m attempting to implement volume sliders:

  • Master Volume
  • Voice Volume
  • Music Volume
  • SFX Volume

Below is an image of the sliders in the widget which are 'Audio Volume Slider’s I’ve also tried this with 'Audio Slider’s with the same issue, I can’t set these values in the blueprint, there just doesn’t seem to be a function to do this like there is when you use ‘Slider’.

As you can see there is an ‘Get Slider Value’ which works for this type of slider but there is no ‘Set’ version I can find which prints the correct values on screen, so I know that’s working.

If I have to use ‘Slider’ instead of ‘Audio Volume Slider’ I could but I do prefer the design of the latter and it is currently working functionally, I just need its value to be settable.

Below can be set see ‘Set Value’ below but that is just the ‘Slider’ not the ‘Audio Volume Slider’


image

Hello. Unfortunately looking up the functions and variables on the documentation page, it seems setting the value on an Audio Slider is not possible through BP.

If you need this functionality, I would suggest using regular sliders as you mentioned or you can create child class of the Audio Volume Slider and add your own C++ function that can change the Value directly, as it is a public variable, just not exposed to BP.

make sure the slider is marked as a variable in the widget editor, switch back to the event graph pull out the widget component reference for the slider, then type get value

Unless you have a specific reason to use that version of the slider, i’d just use a regular slider instead of audio slider base

You should be able to copy the visual settings of the audio slider onto the regular slider

as far as calculating db goes, there’s probably a way to do that, but most ppl would probably prefer that it was just a % type thing out of 100 as that’s how there used to their OS audio settings/sliders

Setting the regular type slider to be vertical is fairly easy, and from there you just copy the visual settings i think called something like “Thumb down” “Hovered” etc, i’ll find a picture of them here in a bit

Edit:

So, copying it straight up might not be as easy as i made it sound, you’ll have to find what the Img being used there is called in the engine files… or probably just make your own in Photoshop or paint or whatever