Closing App, save levels! Need Help
OdenSoftware
Member Posts: 34
Hello,
Dunno if this discussion is placed in the right topic. As the title says i need help with saving levels after closing app.
I have my app running on my iPhone device (used Ad Hoc & xCode). My game is using a level system, so when u win lvl 1 you unlock lvl 2 etc.
This works fine as long as i don´t close the app thought double tapping the home bottom and the shut the app down.
After i have shut the app down and open the game I have to start at lvl 1 again.
How can i avoid this problem?
Dunno if this discussion is placed in the right topic. As the title says i need help with saving levels after closing app.
I have my app running on my iPhone device (used Ad Hoc & xCode). My game is using a level system, so when u win lvl 1 you unlock lvl 2 etc.
This works fine as long as i don´t close the app thought double tapping the home bottom and the shut the app down.
After i have shut the app down and open the game I have to start at lvl 1 again.
How can i avoid this problem?
Comments
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Are you using GS Viewer or an adhoc install of the app?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
This are my attribute for the level savings after i have unlocked next level.
Attribute [game.Win is true]
Attribute [game.Level = 1]
Attribute [game.World = 1]
Actor receives event [overlaps or colide with actor of type Goal]
Change attribute [game.level1world1Cleard to true]
Save attribute [game.level1world1Cleard key: save]
Then i have an actor on the starting screen saying
Load attribute[Key: save attribute:game.level1world1Cleard]
Load attribute[Key: save attribute:game.level2world1Cleard]
Load attribute[Key: save attribute:game.level3world1Cleard]
Load attribute[Key: save attribute:game.level4world1Cleard]
etc.
What am I doing wrong this time? Please help
Save attribute [game.level1world1Cleard key: level1world1Cleard]
If you do it that way, just make sure to double- or triple-check all of your spellings.
It's generally easier to use a table if you have many attributes to save. Just store your attributes in a table with each column representing a level. The nice thing about tables is that they auto-load at the start of the game and you can save all of those attributes with a single Save Table [table name] behavior.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User