I am new to UE4 and have a project going. I got a menu system with a save system as well in it(menu starter kit ) from marketplace. it uses a bp_SaveGame blueprint. it is added to my character bp and creates OnSaveGameSave function there with 2 nodes(save game in and save game out return node. documentation says to just add variables for save data in bp_SaveGame bp ,the data will be filled in apparently between those nodes in OnSaveGameSave section in my character bp. so I create an integer variable in savegame bp for ammo, I created an Ekeytype variable for some collected keys in the level ,made it an array for all the keys. nothing changes in my character bp in OnSaveGameSave section . nothing saves . no references.--------------- is there something I am missing? should it auto create nodes for the save data there? or do I have to add them?in general when creating save data variables in a save game bp, do I only need to create the variables there , or do I also need to add nodes in the bp to reference the variables?the keys I am adding are destroyed actors when collected.----------- the save system has player location and rotation in it already and that works correctly. I am noob with save game portion and I think I don’t understand the save data variables fully .---------any help appreciated. thanks
Updated Answer (pushed up from comment ) :
Okay let me explain in detail. You have 3 important functions,1.Does Save Game exist, 2. Save Game To Slot 3. Load Game From slot. You need to give a name to the slot (basically the name you give when selecting the Save game). I have an example where I save, I have hardcorded the name to be “SXSW”.
Save Game example: Save Data posted by anonymous | blueprintUE | PasteBin For Unreal Engine
Load Game Example: Load Game posted by anonymous | blueprintUE | PasteBin For Unreal Engine
My PlayerSaveData blueprint (the one I am casting to) is a Blueprint that has derived from “Save Game”. Player save info is basically a structure that has all the data I need to save.
I hope this helps
the save system has 5 save slots , 1 quick save slot , and I think 1 auto save slot. i’m basically trying to understand the work flow for creating save data variables. like create variable in save game bp , then what? add nodes in graph for the variable? do I need to add nodes for a variable created in save game bp? in this case the save game bp is added to the character bp which creates a function in character bp called OnSaveGameSave, which is apparently where the save variable data is collected.
Okay let me explain in detail. You have 3 important functions,1.Does Save Game exist, 2. Save Game To Slot 3. Load Game From slot. You need to give a name to the slot (basically the name you give when selecting the Save game). I have an example where I save, I have hardcorded the name to be “SXSW”.
Save Game example: Save Data posted by anonymous | blueprintUE | PasteBin For Unreal Engine
Load Game Example: Load Game posted by anonymous | blueprintUE | PasteBin For Unreal Engine
My PlayerSaveData blueprint (the one I am casting to) is a Blueprint that has derived from “Save Game”. Player save info is basically a structure that has all the data I need to save.
I hope this helps
how come this setup doesn’t save and load the red and black keys(these variables are in the BP_Savegame and in my character BP.
someone said my save portion was correct but in restore save game I am setting the wrong variables, I am unsure how to set. also they tried to explain it this way but I don’t understand.
What you need to do: Code:
character.variable = savegame.variable
What you are doing: Code:
savegame.variable = savegame.variable
someone said my save portion was correct but in restore save game I am setting the wrong variables, I am unsure how to set. also they tried to explain it this way but I don’t understand.
What you need to do: Code:
character.variable = savegame.variable
What you are doing: Code:
savegame.variable = savegame.variable
well in the save system i’m not sure what the slot names are. its almost like there are no specific slot names, just “save to current slot” .so if I use a load game to slot , not sure how I would direct it.