keeping track of totals
sswisehaupt
Member, PRO Posts: 76
Please help!!
I am testing my device on iPad. I have total scores. When iPad is turned off and on the totals are there. but when the scene is replayed the totals change to the amount total in that scene and then continue correctly. I want my new amounts added to the totals before the iPad is turned off. I have totals saved to a table. So when the iPad is turned back on it loads the total. Great. I have an attribute that change game.total to game.total+1. That attribute i believe is reseting to 0 when the device is turned off and on. Help.
Comments
Yes, attributes reset to their default value (e.g. zero) when an app is closed and re-opened. To preserve the value, you need to either use Save and Load Attribute behaviors or you need to do Change Attribute game.total to tableCellValue(tableName,row,col) for wherever you are keeping track of the total in the table.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang Ah!!! Thanks. Will correct.