Not sure if burnt out or missing something obvious. I was getting my savegame in the parent pickup and then making a save function which called a function in the save game class that took in a string and adds it to its array then saves the game. The issue, it doesnt work. Nor does it save the content and nor does it add to the array. It always prints length 1!
EDIT: in the screenshots I got a reference to save (and removed the get fromt he parent) in an attempt to debug it.
This is really stupidly weird. So in my Game Mode I do have a reference and calling it from there works as intended. Getting a ref in the class itself does not work. It just saves 1 entry and doesnt even permanently saves itâŚ
this is in the BP_Save Class however. I am using switches that are toggled the same and it does work. However I am calling that save from the BP_switch via the game mode which then uses its save variable to call âsave switchâ function.
Again the self is within the SaveGame ClassâŚ
okay hold on, so it seems I am a bit confused. I shouldnt save the game within the BP class of save game? Just use it to store values but the actual saving should be within the class I am trying to save from?
Second, every class that needs something saved should have a seperate BP save actor? So getting the save from the game mode is not âcorrectâ? I thought it references one and the same thing.
weird thing is im storing 2 class data within the save game and those work fine. However specifying a save game reference with an input now seems to work. I built the system so it saves within the save game. I have added a reference to the Save Game function which takes a safe game bp now
You can save from the inside, but be careful. Donât use self, and make sure you save the actual instance, so you donât overwrite the previously saved data.