Download

HELP! My save game is still not working!

I have followed several tutorials on how to set up the save game feature, but none of them are working for me. Currently, I have a blueprint in my level (BP_SaveActor) that is just a blank actor blueprint (meaning no mesh), which contains all variables I want to save. I have the string of variables connected to a branch on the Event Tick. When the boolean (“Update save”) is true, it gets the value of each variable and sets the corresponding variable in the actual save game bp.

b2dfc457201be750cde16af0714ba7fdd9a1d5a9.jpegb2dfc457201be750cde16af0714ba7fdd9a1d5a9.jpeg

f6f63e5b7b6f1b53ced016051dd80cdbea1dd163.jpeg

For example, I have a tutorial that I want to only run through once. When the user plays the game the first time, they are given the option to go through the tutorial, if they choose to play through the tutorial, a variable will set stating they have played before. Then, when they play again, it will not ask them to play the tutorial again, but rather go straight into the game. That set up is here:

The print string attached to the above returns nothing. However, if I play again in the same session, I am not prompted to play the tutorial again. But, if I close and reopen, it does. So, this tells me the variable is being set. It is just not saving. Do I have this set up properly? If not, can someone please tell me where I am going wrong on this?

Did you use a “does save game exist” and “load game from slot node”

Sorry, I meant to add this in the original post. Yes, I have a Does Save Exist? and loading set up.

03bb0c3dad41cc54f54a3554e27fd3317c22e7a4.jpeg

Upon further inspection, it appears the event tick in the tutorial bp was causing the issue with the boolean variable. However, the integer varaiables do not save at all. I have a few variables storing quantities of items set up. When obtained, it adds 1 to the total for that item, and saves. However, this practice does not work. Example of my set up is here:

1e2d520d6613978ff816c5b1932770a06f03a837.jpeg

The variables are then saved in the same manner as before (as well as reloading). Any idea why this would not be working?

I’m not too experienced with the engine yet, so I don’t know if I’m too helpful.

Have you tried setting a variable on a button press, casting it, setting KTCSAVEs version of that variable, and then saving the game?

Simply set an integer to 0 by default, add 1 on a button press, cast, set, and save it.

On a different button press, after closing and reloading the game, load game from slot, cast to KTCSAVE, set the variable from it, then print it to see if it’s not 0.

I do know that casting and updating on event ticks can be a little buggy and would suggest that trying a button press as the event could work. Unless they’re constantly changing per tick.

I’m sorry if this doesn’t help much. I haven’t gotten into saving game objects with nearly as many variables as shown in your project as of yet.

The integers for the item qunites are in a function that is already connected to a button press. The cast fails every time I try to update the save for the quantity.