Save and load bool variable / Open level questions

Hello. I have a menu created over RealisticRendering template. So there are two buttons. first will activate the “roomtour”, second will deactivate. So my idea was to save and load games to slot, to store boolean variable which is activated when I click “roomtour on”, and deactivated when I click “roomtour off”. So storing is easy, I made that already. My problem is, that I want to read those config file in another level / map. So I created Load Game to slot script there (level blueprint) and wanted to put this in new bool variable which will activate matinee example thing for cameras. So it stores variable, but in new level, however load function returns false, even boolean variable in other level stored as true. Here are my scripts / functions:

main menu script (don’t care about move component things, its just decoration)


My save boolean function:


My get saved boolean function:


script in Level Blueprint of level thats going to be opened by OpenLevel:






Thanks for your help!!

push

Hey,

Can you show me what your Saver Blueprint looks like? You use same name for Variables in different Blueprints, it looks like, and I’d like to try to duplicate your setup to reproduce this. Thanks!

In my saver blueprint theres nothing, just two variables, roomtour bool and input_bool boolean.

Hey Ultimate,

It looks like you’re never changing values of your Saver variables, so it’s always saving your Roomtour variable in Menu Blueprint as default value of Input Bool variable from Saver. To make it easier to see what you’re doing, I would recommend changing names of variables in your Saver to something like SvrInputBool and SvrRoomtour. Then it should be pretty clear what’s happening; in both Save Boolean and Get Saved Boolean functions, you’re getting Saver’s variable (Input Bool and Roomtour, respectively) and setting Menu’s Roomtour with its value. Without anything updating Saver’s variables, that will always return whatever default value for those variables is.

Hope that helps! Let me know if you have more questions.

Sorry, I’m pretty new in Blueprints. So how should I update saver’s variables?

Something like this should work:

I de-cluttered graphs a bit, but these are functionally same. only real difference is that I am saving Saver’s variable in Save Boolean function rather than Menu’s variable. I named Saver variable Svr Roomtour just make it clear which one I was using.

And this is Get Saved Boolean function cleaned up. This one is functionally same as what you already had, so if you don’t feel need to change that one you shouldn’t have to.

Thanks !! It works!