Help with temporary booleans in tables.
Happy Easter to most of you.
Right, I have a table with my guns on, its pretty simple.
When the gun is unlocked its changed to true which mean you can use the next gun.
In my game i have a storyline mode which is a paid IAP, but for free you can play a different mode.
So my problem is, when playing the free game when you reach 700 coins you can purchase the next gun, which would make the gun Boolean true, which is great. I'm not saving the table after but if i were to go into storyline where the gun shouldn't already be unlocked it is. I know why it is obviously but is there anyway to reset the table to the state it was before you play the free game.
So example, in story line you have 4 true Boolean's (4 guns) i then go into the free time survival mode and 4 are unlocked already which is fine, but if i then unlock a fifth in survival mode (free version) then go back into story mode i don't want the 5th Boolean to be true.
i know if you reset the game and don't save the table it would reset but anyway with resetting the whole game.
also i cannot use different tables as my animation is all linked etc.
Thanks,
Comments
Copy the table to an empty table at the beginning of the game. When you need to reset it, just copy the backup to the used table.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang hi,
i have just tried that and thought it would work, i understand at the beginning using a replica table which works perfectly, but i cant seem to get the original table back once in storymode.
"Story mode" doesn't mean anything to me in relation to your app but copying a table is a pretty straightforward thing. It replaces the data. Are you finding that the data is not replaced? If so, how are you verifying this? And what happens if you just make a simple When Touch is Pressed rule to copy the backup table data into the gameplay table and test that? Does that work?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang sorry for the confusion, i added a 3rd table which i believe is what you were originally talking about and got it working perfectly. Thanks so much