Load Attribute and Save Attribute not working
GamePizza
Member, PRO Posts: 227
I'm trying to store values in persistent storage with Save Attribute.
I'm testing it on GS Viewer on iPad but using Load Attribute I am not getting back the values I saved when I start the game again on GS Viewer in the Recent Games button.
What am I doing wrong. I am sure I am using the same keys.
The values I load are always 0.
I'm testing it on GS Viewer on iPad but using Load Attribute I am not getting back the values I saved when I start the game again on GS Viewer in the Recent Games button.
What am I doing wrong. I am sure I am using the same keys.
The values I load are always 0.
Comments
Saved a text attribute, boolean, integer and real and those values loaded and displayed when start game again in gs viewer. But don't understand why it doesn't work in my game project.
I have a problem publishing my game for HTML5.
I used to store values in Tables for the iPhone version of the game, and nothing was wrong! I tried to publish for HTML5, and after a lot of headaches, somebody from Game Salad's Facebook said that HTML5 doesn't support tables!! and it's seems to be the truth!
So, anybody knows if HTML5 supports Save and Load attributes for persistent storage??
Exist any other way to save values in HTML5?
Doron
But after clicking Home, then clicking Preview, the "High Score" is reset. Is this expected since it went off Preview? Does it mean that my "High Score" is not persistent when I try it on a real iOS device?
Thanks!
you'll have to test on a device to make sure
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
I would probably change your key names to something more descriptive too because if you get too many like you have there it'll be hard to know what key 1 is linked to without opening that actor everytime. If I'm saving coins for example I would do
Save Attribute
Attribute: game.coins
Key: coins
That's far more descriptive then a key numbered 2.
Rule: Press down
Change Attribute: Game.key_own true
Save Attribute: game.key_own. Key: keyown.
Like that?
I did nothing inside each actors just only true/false, 0/1
And deleted expression in load and save actors. Game saves perfectly but it not saved you close the app completely (double press home button)