what is the standard way to save and load a boolean attribute
jorkos
Member, PRO Posts: 353
Hey guys, what is the standard way to save and load a boolean attribute? Is there an up to date tutorial? Thanks, just having an issue with this.
Comments
Add the attribute in the Attribute box. Put a text key directly into the Key box. Do not use the expression editor. Be sure the text matches exactly.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
In addition, consider when you are saving and loading. Attributes should be loaded when the app loads which means that you place the Load Attribute at the top of an actor's rules and place that actor on the first scene (obviously, in some cases you might not want to do that but in general it's advisable). Attributes should be saved at crucial points in your game (e.g. after the score changes, the level increases, etc.) or within a Timer.
Also know that you should test this on a mobile device as it won't be entirely accurate in Creator (e.g. if you edit a scene and then Preview it again the saved data will be lost).
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User