Save multiple bools at once?

Easy Save 2 has been replaced by Easy Save 3, so is no longer supported.
Locked
Zandan
Posts: 7
Joined: Sun Jun 29, 2014 9:19 am

Save multiple bools at once?

Post by Zandan »

Hello, just registered.

I'd like to ask is it possible with ES2 to save multiple bools at once. I have over 40 true/false bools in my project. I save them using Playmaker with the save bool action individually.
However in another scene I want check if any of those bools is true? Would than mean I have to create 40+ actions to check if any of those is true/false. Sorry for the lame question, no programmer here.

Also when I save a bool in scene01 with "true" in defaultFile.txt with tag "save1" and I load an action load bool with the exact same parameters in another scene05 it does not seem to work and I get an error file can not be found.
Would than mean I have to keep a Save Manager object throughout the entire game and not destroy it, because I tried save/load ints in the same scene and it works correctly. Should I initialize something in the begging of the game or should I start use action directly.

Also when loading the game for the first time and the defaultFile.txt is not created yet, as nothing is save yet I get errors that the file is not found. Is that intended? It means that the game will throw errors until the player saves something.
So should the file be created manually somewhere before the very first start of the game?

Thank you!
User avatar
Joel
Moodkie Staff
Posts: 4852
Joined: Wed Nov 07, 2012 10:32 pm

Re: Save multiple bools at once?

Post by Joel »

Hi there,

As Playmaker has no built-in way to handle collections/arrays, the only way to save and load your bools at the moment is to save them separately. We unfortunately have no control over this.

With regards to Easy Save not being able to find your file, make sure that the filename and tag which you used to save are exactly the same as the ones you are trying to load. It needs to be the same case, same whitespace, etc. You should not need to keep a save manager throughout the entire game, and you shouldn't need to initialise anything. You might want to make sure that the 'Save' action is being called in the previous scene. If you've not updated Easy Save in a while, you'll want to make sure that you've updated to a recent version.

If this doesn't work, please send me some screenshots of the actions you're using to save and load and I'll see if I can replicate it at my end.

And to answer your final question, you need to use the Exists action to check that your file exists before trying to load from it.

Hope this helps!

All the best,
Joel
Zandan
Posts: 7
Joined: Sun Jun 29, 2014 9:19 am

Re: Save multiple bools at once?

Post by Zandan »

Hi, thank you. It helps.
I'll carefully follow and if I have issues I'll post screens.
Locked