Problem with loading and saving data across different scenes

Discussion and help for Easy Save 3
Post Reply
bastilar
Posts: 2
Joined: Sat Oct 10, 2020 7:50 pm

Problem with loading and saving data across different scenes

Post by bastilar »

Hi, I bought easy save 3 yesterday and it's great.

I'm still teaching myself coding but I'm having a problem. In scene 18, I have perks and perk points saved/loading. It works great. Except when I try to use the same data in a different scene. Basically, I want upgrades to persist through different scene changes.

This is where I can't figure out what is wrong. based on the file size, it seems that easy save is creating, saving, and loading data only for each scene separately and not loading from the initial same data, if that makes sense? Here's a screenshot of the problem:

Level 17: perks and upgrades bought
Image

Level 18: perks and upgrades bought (it's saved in its own section in the file apparently)
Image

reference pictures in case above don't work https://twitter.com/realjunsonchan/stat ... 41/photo/2

As you can see from both pictures, the game is loading and saving its own separate perk data for each level. I want to make it so it uses the same data.

I tried using the add perkmanager as a reference but I got a bunch of compile errors that I didn't understand. I also don't understand what the reference part of easy save does.

There are 18 levels, and 1 level select page, for a total of 19 separate scenes. I think I'm asking, how do I get easy save to reference the same data, using the auto save feature. Thanks Joel!
User avatar
Joel
Moodkie Staff
Posts: 4852
Joined: Wed Nov 07, 2012 10:32 pm

Re: Problem with loading and saving data across different scenes

Post by Joel »

Hi there,

Auto Save needs to save data by reference. Because these references won't exist in any other scene, it's not possible to load it in another scene.

Instead you would need to save and load them by value. You can do this using the ES3.Save and ES3.Load methods.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
bastilar
Posts: 2
Joined: Sat Oct 10, 2020 7:50 pm

Re: Problem with loading and saving data across different scenes

Post by bastilar »

Oh ok, I'll try that then. Hopefully it won't be too hard for me to figure out since it appears I only need to save and load 2 values. Thanks
Post Reply