what is the standard way to save and load a boolean attribute

jorkosjorkos 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

  • ArmellineArmelline Member, PRO Posts: 5,369
    edited March 2015

    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.


  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    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

Sign In or Register to comment.