How to visually update a slider after loading from a config file

Godot Version

Godot 3.5


Hi! Silly question perhaps, but I have been struggling a bit with this concept. I am using player settings, letting the player control such things like difficulty levels or music volume, through sliders. (logic being that i’d rather have a range they can choose from and not input a number that could break the game or hurt their ears in case of music)

I have made it so that the difficulty levels and music volume are saved and loaded correctly in the config file. However, the sliders do not visually update after loading, which I think could be confusing if you think you set the music to low but it still appears high (even if it sounds low volume)

sorry if i didn’t describe this right, but I’m failing finding the answer on teh docs, though there maybe an obvious solution I’m missing and i just broke my brain too hard being wrong about what i was debugging at first ^^;

TIA for anyone who can help :3

Hi there,

setting the value Attribute of the Node directly updates the view as well.

I use an integer to set it directly inside the _ready function. But you can do it anywhere you have access to the Node.

doh! that never occured to me. thank you, I"ll try that now

edit: it worked! thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.