saving predefined attributes

Shishkov

  • Posts: 169
Hello averybody,

I want to save some attributes, not all, only special which I want. And I know that I can't do it with stencyl functions(SAVE, LOAD) which save all global attributes. Or I can? Or maybe there is another method to implement it that you know?
I have 11 global attributes in my gane and I want to save only 2.

Please be so kind and help me to overcome that problem.
Thank you

Roadcat

  • Posts: 46
You're right. The SAVE function saves ALL global attributes :  http://www.stencyl.com/help/view/saving-and-loading-games/

You would have to write a custom block to just save 2 of them, which would need to be done in AS3. Here's a tutorial that will help: http://gamedev.michaeljameswilliams.com/2009/03/18/avoider-game-tutorial-11/

gplar

  • Posts: 1115
Why bother. Save all, reset 9 after load and use the save states of the two you want. ;)

Shishkov

  • Posts: 169
I have already tried to save all and reset them when user enters main menu, but I also have 3 variables which must work during hole game and I can't reset them. When I want to load attributes in order to use 2 relevant variables, it loads its previous values, so another three variables don't work properly. Anyway, I think that maybe I should try AS3 as Roadcat recommended.
Thanks a lot.
And one more question:
If I want to create a leaderboard and use it in my game without any mochi or congregate servers, will it be useful and proper thing to show people from different countries their scores saving them only in my game?

« Last Edit: January 20, 2013, 04:00:40 am by Shishkov »

dtrungle

  • Posts: 1938
As gplar suggests, if you really want to learn AS3 and code this save/load feature then go for it. But if you are hesitant about it, just use Stencyl's feature. Unless Stencyl's feature is lagging you terribly or something.

I'm at a lost as to what your first paragraph is stating.  :o You can choose what GA to reset.

Save files are saved on the players computer. You can not mingle two different players' save file. You will need a server or similar to hold each player's values.

Shishkov

  • Posts: 169
FLASh asks for permission to save something in your computer(localSharedObjects), but in my case it doesn't say me anything when I test it in my computer and use SAVE&LOAD functions. How it happened if you said that it was saved on players computer without request?

« Last Edit: January 20, 2013, 03:57:54 am by Shishkov »

dtrungle

  • Posts: 1938
Not sure about that. Maybe it's the user's settings. Maybe it's asking for more storage space.

It saves as a cookie, does it not? Hmm.