I made global variables, the slider always returns to halfway when I leave the scene and come back, the sound doesn’t change anyway
please explain in simple words or give an example, thanks !
I made global variables, the slider always returns to halfway when I leave the scene and come back, the sound doesn’t change anyway
please explain in simple words or give an example, thanks !
You need to set the slider value at the beginning of the scene to what it was set to previously:
Also:
ok it works question: how to make the volume option save after the player leaves the game?? and how to set Setting_vol.sound so that when you first enter the game it is at 100% sound ? (now it is at minimum)
Use local storage. Write the value when it changes, load the value at the start of the scene
Change the initial value where you define the variable:
.
I have no idea how to do this [Solved] Show total time at end of level on "You Won" screen? - #40 by MrMen
How to Write and where to save this file? I entered these names from the link in action and found nothing
With this action:
replace:
LevelTimes
with Setting_vol
LevelTimeSave
with Setting_vol_save
MyGameName
with the name of your game.
This will save the Setting_vol structure to local storage.
To load back the value, use these actions:
and replace:
LevelTimes
with Setting_vol
LevelTimeSave
with Setting_vol_save
MyGameName
with the name of your game.
You could also change jsonLevelTimes
with jsonSettingsVol
, but that’s just a superficial change.
You don’t. GDevelop does this for you and saves it to local storage. To see the value, you can click ctrl + shift + i, and click on the application tab. There’ll be a section titled Storage, and it’s under that.
I can’t find the write and read action , and where exactly to add this action?
Question: in global variables I have saved “Settings_vol” you have Setting_vol" should I change it in action? is there any difference?
Doesnt matter you can keep any name as long as the expression is correct.