save and load game

Hello, I’m trying to create the nodes to save and load my app, but I don’t know what I’m missing or what I’m doing wrong, I’m new to this… I want what the player writes in the WEAPON_SHEET, in the weapon1 and weapon2 section , it was saved when you hit the save button, and when you start the game again what you have saved is loaded.


In the “saveGame” blueprint I have created 2 text type variables.
I attach images so you can see what I have done. Can someone give me the solution? Thank you and greetings.

You’re not actually setting them to anything

image

Also, why do it in the game instance? Why not just set the save game directly from the widget? :slight_smile:

Hello, thanks for answering. What nodes should I add in the pink points of weapon1 and weapon 2? And I put it in the game instance because I saw it in a tutorial, but I have no idea…haha, could you tell me which blueprint to put it in? Thank you and greetings. :slightly_smiling_face:

1 Like

Well, you’ve already got the variables in the widget, so you can put the code in the widget?

Also, worth noting, is you only need to create the save game ONCE :slight_smile: Because, if you create the save game every time you save, you’ll just overwrite what you had before.

how do you get that node? I get this error when I try…

1 Like

Drag from the variable and search for ‘get text’

Okay, I’ve already joined it, although it doesn’t work out like you did, but hey… When I click Save, the save file is created, but I have compiled the application and tested it on my mobile, and I fill in the sections of weapon1 and weapon2, I hit save, I close the application, and when I open it again, I hit load but nothing loads… :smiling_face_with_tear:

What kind of box is Arma1?

For both ‘editable text’ and ‘multiline editable text’ I get

image

Does the saving / loading work in the editor?

What version of the engine are you using?

PS: Do you understand that even if the text is in the save game, you still have to load it yourself, next time you run? In the widget, you have to load the save game, read the text lines, and set the boxes with that.

arma1 is an “editable text” and arma 2 a “text box” (but also editable by the user).

And I don’t know how to do the second part that you tell me, about loading the text… :sweat_smile: I’m new to unreal and I don’t understand programming, I do things according to how I see tutorials…hahaha

1 Like

What version of the engine are you using?

When you load the save game, you need to

It will not happen magically :slight_smile:

5.1.1

1 Like

OK, that’s why it looks different…

Ok! Thank you very much :slightly_smiling_face:
I will learn little by little

1 Like