Problems With Savegame

Hello,
I want to Save Some Actors with the Savegame Bluprint but there are some Problems.

After the restart of the game the informations about the actors are wrong or deleted and I dont know why

For this Test I made a PrintString for

ActorName -->deleted after Restart

ArrayIndex -->Is saved

CharacterName–>are only like the first Spawned Character

Location -->dont know how to describe this ^^

Hope one of you can help me to understand my mistake

Thanks

Well, frankly, i think you got a bad case of messy code, i spot at least 2 array list variable used to store your character, and after adding your newly spawn character, those variable didn’t get reference again, which leading me to question why did you put them inside the SaveGame function? Based on the rule of thumb, complex code result in complex problem and kill tons of innocent neuron, and multi-task function is one of the main reason for complex code.

Also, can you show us how did you set up your save game blueprint?

I wanted to save all the changes in the game

the the character was just a test because I have no possibility found to" save all changes "

I had originally only the character array because all setings for the Character are saved in the CharacterBluprint

but that did not work So I wanted to write about the structArray the information again to the respective character

in savegame bluprint nothing. still 4 Variables character / character array struct / structarray

I hope that helps a little bit to understand the problem

sorry for my bad English

If i remember correctly, you can’t store actor/ character in a save game, so i suggest you remove the character list from your struct either add variable to current struct/ create new struct to store your actor data. If you still got the problem, try to follow the tutorial, you may spot error in your code.

I wrote the blueprint over again . This time only the Actor class is saved .

But the problem is the same

when loading neither the actor nor the class is displayed

I didnt understnad the last of your comment

you could graphically represent this

?

I just observed something interesting

I ahbe the .sav file geköscht and started the game

spawned a few characters

then I have the closed program

the .sav was ca 700byte large

then I have the game started again

again spawned a character

then exits again

and the .sav was only 200byte large

all seems to be anything overwritten .sav in the restart of the game

OK I think I got it

Not the way i want but the Result

ThisTutorial was realy helpfull

I forgot after the “spawnActorFromClass” node in the “Spwnactormacro” you have to add an “spawnDefaultController” node target is the return of the "spawnactor"node