Slider Extension Volume Consistency

Hello everybody!

I took to the GDevelop Discord to find an answer to my question and while many people were helpful, I didn’t really understand it. I need it dumbed down in steps. I know this is a big ask but this kind of issue is where I start to give up and I don’t want to give up on a very promising project with GDevelop.

Basically, I want the slider (Extension made by Tristan) to be able to change the volume as it increases. When the user switches to another a scene (Via the Exit Mainmenu button) I want the music to change but the volume that the user chose on the Main Menu scene to exist at the same level in the new scene and for every other scene onwards and the user only being able to change the volume by going into the main menu.

I apologize if this is confusing or may be frustrating to those who have already tried to help but I’m not as smart as some of you are so I need the simple version.

Kindest Regards

Azaroth

I haven’t used Slider Extension but I looked at its Behavior and maybe you can do:
In every Level scene:
In the Play Music action:


Change the value of volume to a GlobalVariable(volume)

Now, in the events of the scene MainMenu
If Slider is being Dragged
Change the Global Variable Volume to the Parameter I circled below:

Note: If it gives only 0 and 1 as output, then do ShapePainter.DraggableSliderControl::Value()/1*100

Hey there Mixen!

Thanks for your response.

Unfortunately I’ve decided to go a different route so I apologize for that.

I will post up the different route I’m going. I have no doubt you’ll be able to advise on the new route.

Kindest Regards

Azaroth

@Muzan this is an incorrect answer since this would not set the volume of the game but set the initial volume of the sound. This is also a way too complex way to do something simple.

The correct answer would be to use the “set global volume” action in the settings scene with that slider using the ShapePainterObjectName.DraggableSliderControl::Value()*100 expression.

2 Likes