Need Help with saving a unlocked level and having it stay there after a close the app and reopen it
BrainStorm Games
Member, PRO Posts: 30
Hi I am working on a app that has 10 levels 1-10 actors 2-10 are set up like this: if unlock2 is false destroy this actor and when the user gets done with one level, there is a level complete screen then the user clicks the continue button and it should to do this: touch is pressed > change attribute game.unlock2 to true which makes the actor appear > save attribute unlock2 with key 2unlock > change scene to level select where the is a actor that is Supposed to load the saved attribute. This works fine except when I close out of the app And when I reopen all the levels are gone! doesn't save or load anything but the 1st level what am I doing wrong?
Thanks in advance
Thanks in advance
Comments
Hi @jjctSoft my guess is that the Load Attribute behaviours are in the wrong place...
If you have a menu card with all of the levels showing, then put the Load Attribute behaviours in an actor placed outside of the screen area.
Tip: presumably then, you've some Rules in the levels actors with locks, whenL2Unlock is true, Change Image level2 image with no lock showing, or similar; go to scene 2.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Hope this helps
Chakku
Good advice from @Chakku, tables are useful for instantly saving with a Save Table Behaviour and no loading required, so best if you have many attributes to save. (If you've not that many, probably best to stick with the Save & Load Attribute behaviours).
But worth pointing out that if you use this way, make a duplicate of your attributes table, so you can keep the first one for a new game, and the other for updating the saves.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Copying the table, making a table or populating the table with your attribute values, did you mean?
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps