How to save a change to the bool variable

I need that after opening the first widget, the variable changes to false and only the second widget is constantly opened

Hey @skanie_official! Welcome to the forums!

Could you be more specific with your explanation? I’m seeing a main menu on the bottom, what I’m assuming is you want the top to trigger ONLY the first time the main menu is opened in the game? Try this:

Describe what you want to happen.

Describe what is happening.

Describe what you want to do in the game to make what you want to happen, happen. :slight_smile: Get back to us, and let’s get this sorted out!

1 Like

What is highlighted in green should be started only once, at the first start, the value of bool (true) should change to false and run false continuously and run what is marked in red.
Sorry if you don’t understand, I’m not a native English speaker

I need to figure out how to save the bool variable after the change

Okay!

So you should save that boolean as a variable in the GameInstance!

So create a variable in the Game instance, and manipulate it from here.

GetGameInstance-> Set ThisBool → False

And then for your branch:

GetGameinstance-> Get ThisBool → Branch.

The game instance clears and resets on game CLOSE.

If you would like it to persist through sessions/after close and open of game, you must add it to a save game object!

1 Like

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