Okay, so I’m understanding why loading the game needs to be saved as a variable- as it currently is, the variable type of the ‘load game from slot’ is just SaveGame, so I can’t set it to the ‘As Save Data Level (or Player)’ . I can however set the new variable to be As Save Data Player, but I don’t think that’s helpful when AsSaveDataPlayer is null. Shown in this video. I’m wondering if I’m meant to change the variable type to Save Game or if there’s something else I’m meant to do.
Alright, I’ve changed the ActorsInScene to an array of struct variables. Here’s the new blueprints.
| Load Game | Load All Data | Save All Data |
For the last part, I honestly have no idea why I did those loops, my bad that was a serious oversight on my part.
One question: I’m having this error, and I’m pretty sure it’s because I’m trying to clear the null variable ActorData in SaveAllData- but later in the game, when I have to override the data, I need to clear it. Unless in the loop later, when I make the SaveItemStruct, can be changed to a set array (if it’s possible, I’m not sure how to go about it). So not sure how to resolve the error.
Blueprint Runtime Error: "Accessed None trying to read property As Save Data Level". Node: Set ActorData Graph: Save All Data Function: Save All Data Blueprint: BP_GameInstance
Blueprint Runtime Error: "Attempted to assign to None". Node: Set ActorData Graph: Save All Data Function: Save All Data Blueprint: BP_GameInstance
Blueprint Runtime Error: "Accessed None trying to read property As Save Data Level". Node: Add Graph: Save All Data Function: Save All Data Blueprint: BP_GameInstance