Hello everyone, I started at the beginning of the year with the Unrealengine 5 and am anything but experienced. Last weekend I started to extend my save game for blueprints within the level, at least I tried. Also, unfortunately I could not find any answers in the forum. I hope you can give me a hint what I am doing wrong.
Initial situation:
Started with the Save Game asset of UE5 in which all information should be stored:
After the start of the game (event Begin Play in Charakter Blueprint) everything is loaded. This works without problems with the player position, and both structures for the player inventory.
I am creating the save game Object in a “Pause Menu” widget (Player Positions and Inventory System works fine)
My first attempt to save the blueprints (like stones and wood that should change position after interacting with them) in the game and load them after the start of the game:
Target Savegame is set in the Charakter Blueprint to → BP Save, and I cast the BP Save from my Player Charakter in the “Pause Menu” widget
→ Saving all Actors with Tag “Save”
Loading:
After Loading Player Position and Inventory from my Savegame
- → Delete all Actors with Tag “Save”
- → Try to spawn all actors with Tag “Save” from my Savegame
Result:
All Actors with Tag Save are destroyed, nothing spawns.
Now for the interesting part:
If I dont destroy all actors with Tag save in the first sequence →
The blueprints that were untouched in the game before the savegame (like stones) spawn twice and the blueprints that my character picked up spawn at the intended position like in a new game (as it should be without destroying the actor in the first sequence).
According to my understanding, if all saved Actors are removed before, it should actually work.
After I read in the forum, that only the relevant information like location and rotation should be saved, I tried to solve it with a Struct (not working, only an example):
Save example:
Array of all Actors with Tag
Load example:
Yeah that didnt work. (also with the right connections)
The basic save and load works as said (Player position, Inventory structs)
I would be very grateful for a tip, maybe also with an example?
Maybe I am completely wrong?
Unfortunately I only have time for this extremely interesting hobby on weekends and probably can’t answer immediately.
Thank you!