Help with Save Game


What am I doing wrong here? All I am trying to do is add 1 to the number of wins and save it. Currently, it is linked to a button to test it, and it doesn’t seem to be firing at all, however, the other events I have firing from the same button work fine.

Hello TrayJ.

What part is not firing? when you activate debug mode how far do the lines go?

This entire section does not fire. I have another variable set up the same way that does save. The only difference between the two is that this one adds one integer to the set variable. I followed the example in the Tappy Chicken project on saving, yet this one just doesn’t work. Does it look like it is set up properly?

What’s the branch doing before the save node? Why do you save before you cast? Is that needed? Not sure it’s causing an issue, but it doesn’t look necessary.

Try a PrintString from the CastFailed pin on the CastToSave node to see if that’s working right. Also, that CastToSave node looks like a generic cast. Make sure it’s casting to your save game object and not a default one.

The branch is checking whether an integer is set (which is tied to a text bind on the button to play again). The integer IS correct, as the button would not show otherwise. So I know it is working up to that point. I am not sure on the save before casting. (I haven’t done save files before). I basically copied the example that was done in the Tappy Chicken Bp for how to set it up. I put a print string on the cast failed for both the loading and saving, though, and it would appear neither is happening now.