Save widget changes

I am making a notepad widget where when the player will find a clue, inside the notepad will appear a text that can be used as a reminder for the player what they have found so far.
I have everything working accept when I close the notepad and reopen it all the text that was there is gone.

Here is how it looks like in game:

And this is how i do the “taking notes”:

clue_bp:

Once the player interacts with the “clue” we check if they have the “notepad” open, if they do then we call a custom event in “Notepad_BP” also we are sending the clue ID to it

Notepad_BP:

Here we add a widget that is just a textbox (CluesText widget) check the the ID of the clue and based on the ID we get the text and set it.

The only problem i have is that when i close the “Notepad” and open it again the text is gone.
How would i fix that?

Thank you in advance :slight_smile:

Here’s a tutorial that you might wanna check out :blush:

1 Like

You need to store the found clues somewhere else that is not UI. Then when they open the notebook, you populate it from that somewhere else. This “somewhere else” could be an invisible actor, the game instance, a subsystem, a component on the some actor. Any place who’s lifetime is not tied to the lifetime of the widget.

Alternatively the notebook UI could be around all the time and you just hide and show it, but that doesn’t work very well once you talk about actual save games (which is how Vis Agilis has interpreted this question).

2 Likes

Did think about mentioning that but assumed that OP would also wanna save the game so just jumped to that part :rofl:

You have some great points worth considering there! :star_struck:

2 Likes