Save and load save game, what did i wrong with my logic ? Help me, please.

I have one “Gate” actor in my level, it’s using as trigger like this :


If charracter touching to this actor, gameplay open my level :



My problem right here :

My DatacenterGameRef get reference from my DatacenterGame actor ( where i stock user name and user index, and other variables for save game )
But when gameplay start, nothing already created in DatacenterGame. So it’s none inside.
After gameplay running, as in my logic, i checking Does save game exit, i wanna get slot name and slot index in DatacenterGame to check, but has nothing in there so this’s first bug .
Then next after i check does save game exits or not, i have 2 choice :

  1. True : LoadGame function running
  2. False : Creating save game object then save game to slot
    All after that execution flow keep going and save game by SaveGame function :

    Then if player character touch to “Gate” actor as trigger, my game play open level as new level.
    Here’s second problem with me, level open always is basic level, variables i saved before didn’t showing up or it’s not got save so new level open always is basic ( mean DatacenterGameRef always none when new level open ).
    What should i changing here to save my variables to save game and load it after new level open ( by let character touch to trigger ) ?
    Someone help me please.
1 Like

Are you just trying to remember which level you’re on?

If that’s the case, you can use a fixed save game name and slot 0.

1 Like

I wanna save last level ( number ) and when character touch to “Gate” actor trigger, gameplay open level will using that number to generating new level ( number ).
I don’t known that’s same with what you say is “remember which level i was on” ?
Can you explain more about using a fixed save game name and slot 0 ?

The save game is a place when you can store things. Variables.

This is my save game 101

Here, SGVariable can be your level number. All you need is the name of the save game

image

If change the slot name, you get a DIFFERENT save game. Why would you want that? :slight_smile:

And the User Index is for different players.

3 Likes

Thanks for help bro.
So i was wasting time when created User Name and User Index in DatacenterGame actor ?
In case i’m not using slot name and index, how can Does Save Game Exits node checking save game exits ? It’s checking in MyGameMode or in DatacenterGame actor ?

I tried removed all slot name and slot index as your example, but when gameplay running it showing up another bug here :


i let it print variable at output Set LastLevel ( which i’m using to save new variable to DatacenterGame ) but it’s warning “accessed none trying to read …”
i was check input pin of Set LastLevel and it showing normal with variable going into Set LastLevel.

You do need A name :slight_smile:

Just one name.

image

It’s looking on the hard drive.

Just do the level variable exactly like in my example.

1 Like

Thanks a lot @ClockworkOcean i past this and fall down to another bug.
Going to study new bug now, thanks for help bro. :smiling_face_with_three_hearts: :smiling_face_with_three_hearts: :smiling_face_with_three_hearts:

1 Like

:+1: :star_struck:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.