Hello there everyone from Gdevelop community! I am here to ask for a help. The porblem that I am currently facing is, a slider that wont stay put at the level that I have set it on. Here is a situational example that I can give to make everyone understands better:-
Main Menu → Settings (Adjusted the volume slider from 0 to…let’s say 60) → Main Menu again (Alright it seems that the volume already set to 60) → Settings again (the slider resets to 0 again).
So yeah, how do make it stay put, that’s the problem. I hope someone could help me with this. Here are my codes btw. Thank you everyone!
There is an easy extension already in GDevelop,
Draggable Slider Control
its easy to setup and it works !
Yes I am using that. But that’s the problem. Everytime I go to my “settings menu” the slider will resets itself to 0 (the slider would be at the very left side).
Are you saving Volume into a Global variable?
Like this. Everytime I go to my settings menu the slider would be at the very left.
How to I save the volume into a global variable? Sorry if that’s a dumb question as I am VERY new with the Gdevelop.
Can you give a screen snip of the code for the setttings scene, particularly the part that sets the sliders?
Here is the screen snip for the part that sets the sliders in my settings.
That doesn’t set the slider. That sets the global volume. And I see that’s a snip of the screen shot you from your first post, which I missed, sorry.
You’ll need to save the slider value to a global variable when it changes, and set it when the scene starts. Something like :
I already done the codes similar to yours but I haven’t set any variables yet to the slider because I don’t know how to yet. I am super duper new with Gdevelop. So I haven’t master this “variable” stuff yet. I am very sorry for my super lack of knowledge regarding this matter.
Don’t be, we all start at the beginning.
That action setting the global variable, the
DraggableSliderControl:: is missing
Value() at the end.
Ahh I did missed the Value() at the end…now it’s done!..thanks alot man! You helped me fix my problem. I wish you a happy day