Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Change audio volume (Audio slider)

Hey, I want to implement simple audio sliders that control the volume of various sound classes (Master, Music, SFX). I set up sound classes and their hierarchy, but now I need to access the volume multiplier somehow, which does not seem to be possible.

I've searched for quite a while but couldn't find an answer. It seems that either no one had this issue before, or I'm just mussing something obvious here. I hope you can help me with this.

Product Version: Not Selected
more ▼

asked Mar 20 '15 at 09:54 PM in Using UE4

avatar image

31 3 5 10

avatar image Omberone Apr 09 '15 at 01:17 PM

Wondering the same thing. Any news?

avatar image ChrisBernal Apr 24 '15 at 12:34 AM

Actually yes, from Blueprint you just can't. It seems like in some areas, Blueprint has some serious catching up to do... In C++, however, changing the volume of sound classes is trivial: SoundClassObject->Properties.Volume = 0.5f; So we created some custom nodes to expose those sound class adjustments to blueprint. If anyone wants it I can post the specific code, but with this great article it is quite simple to implement.

avatar image intoxicat3 Feb 07 '16 at 04:24 PM

Really there need to be way to change sound class volume from blueprints. This is important feature for every game that have sounds and music (so...every game) we are waiting for this feature for long time, a lot of people added this in C++ in sec. It would be nice to have it officially in binaries.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Hi. Not sure if this is what you meant, but this is what I did for a project I'm currently working on. (I just made a new empty project to test it for explanation purposes)

First I made a Widget Blueprint and just put a slider in it. Then I created a "binding" on the Value of the slider. alt text

Then in the binding (I named it "Get Music Volume) just make a new float variable (called mine Music Volume) and connect it to the return value. Put the default value on the variable to 1. alt text

Then go back to the slider and make a "OnValueChanged Event" from it. Set the Music Volume variable based on the Value from the slider event. So that the Music Volume variable will be changed based on the sliders position. alt text

And lastly set it all up in the level blueprint (or wherever best suited depending on your own project). At the start of the event I created the slider widget and made a reference to it that is again used for the "Cast To Slider" which gets the Music Volume variable from the Slider Widget.

Put the sound you want to play out in the level and reference it in the Level Blueprint. make a "Set Volume Multiplier" and drag the Target node to the music reference and it will create the "Audio Component" thing between them. Connect the Set Volume Multiplier with the Music Volume variable, and it should work. (just have a camera in the level and get the mouse to show up so you can drag the slider) alt text

When you start the level now, the music will start and you can turn the volume up or down with the slider.

I used this to change the Music Volume in my project, just connect every in-game Music or Sound effects up to a slider like this and maybe have it in a pause menu or start menu.

Hope this helps :)

more ▼

answered Apr 26 '15 at 03:23 AM

avatar image

51 4 7 9

avatar image pcjjdy Aug 02 '16 at 06:37 AM

Why I can not auto play music according to the last pic in my level blueprint?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Couldn't find any blueprint-only solution, so I've maked it in code. There is C++ example.alt text alt text

more ▼

answered May 11 '16 at 10:13 AM

avatar image

94 2 14 14

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question