I am using check boxes for buttons that have an off and on, making a menu ui rn and have buttons for “fullscreen, music, sfx” which all 3 are check boxes. There was no issue but i made a save system and found a bug. Lets say i leave the checked state for fullscreen as unchecked the bp looks like this
when i click the box the “bFullscreen” turns to true and i save it like this, when i load the game i check the booelan via printing and it still is true but ofc the box returns to its old state. So i make a binding for the button to change states and the binding is bFullscreen, but this time when i click it it doesnt change state so nothing happens. How can i fix this bug?
We can’t know what might be wrong without you providing all the related parts of your blueprints, including the entirety of your saving system. Until then, all I can suggest is checking this tutorial out:
i didnt write much about save system cuz i dont think its related to that, but my save system is like this, pretty much same as the video, i store the variables in a struct and bFullscreen is one of the variables that i save
and in the ui at the event on init i load the settings and in the game i save the settings by pressing a key just for debugging.
What i want to achieve is binding the check box to a booelan but still be able to change its state by clicking it. This way when i load the game it will change back to saved state and i have the option to change it by hand.
Wasn’t your issue about not being able to save a variable?
Also, it also matters how you handle the saving. So could you also provide the part where you update your bool type variable’s value that you store in a struct?
it actually works but because its binded already to something i cant press the box and change the state anymore so its stuck. I tried it making in blueprint manually but that become a mess and failed to do it then came to write in forum.
Note: If you’re not triggering the checkbox via keyboard aside from the mouse cursor, you can replace those branch nodes that set the variable named “Check” with Flip Flop nodes.
In the blueprint named “Save_BP”, there’s no code. Just the varible named “Saved Var” is declared there.