Issues with removing saved Attributes...
Papalati_Games
Member, PRO Posts: 6
I load a group of saved attributes when my game starts and they load correctly. They are all booleans. They start out as false and then set to true.
I then built in a button that resets the attributes back to their default values and that works, but when the game is closed and restarted the original saved attributes are reloaded.
When I reset those attributes back to zero and use a save attribute after each one shouldn't it update the old attributes?
Any ideas?
Thanks in advance!
I then built in a button that resets the attributes back to their default values and that works, but when the game is closed and restarted the original saved attributes are reloaded.
When I reset those attributes back to zero and use a save attribute after each one shouldn't it update the old attributes?
Any ideas?
Thanks in advance!
Comments
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Here's an example.
Change Attribute
game.level2unlocked to true
save attribute
game.level2unlocked key = unlock2
then on startup
load attribute
key = unlock2 game.level2unlocked
then I have a button that says
if game.level2unlocked = true
change attribute
game.level2unlocked to false.
save attribute
game.level2unlocked = locked2
Now that I just wrote that, I'm gonna just guess that because I'm not saving back over unlock2 that is why it is still loading the old key?
Correct?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User