saving and loading attributes

mshuraih mshuraih Member, PRO Posts: 179

anyone having trouble in loading saved attributes, I tried all the trouble shooting mentioned before still not working i have my load attribute behavior at the initial screen and saving the attribute at the game paly scene ( score and coins )

Comments

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

    Something to keep in mind is that the key names must match exactly when you load and save attributes. Post screenshots of your load and save attribute behaviors so that we can help you troubleshoot further.

    Have you used Log Debugging Statements right before your load and save attribute behaviors to verify that they are indeed triggering? If so, what was the result of those statements?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • mshuraih mshuraih Member, PRO Posts: 179



    I m not sure how to use the debug function .. the keys are matched

  • simon31184simon31184 Member Posts: 14
    edited August 2014

    @mshuraih@yahoo.com said:
    [images]
    I m not sure how to use the debug function .. the keys are matched

    Just a question, are your actors in the scene?

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

    Any expression you put in the Log Debugging Statement behavior appears in the Debugger window (access it from the View menu).

    So you can type "made it here!" or "should save attribute now" or an actual attribute such as game.Time or anything else you like. If you place them strategically throughout your rules, it's easy to see what's happening or not happening that should be.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Andrea_ComisiAndrea_Comisi ItalyMember Posts: 328

    The load attribute and save attribute didn'g work on the gamesalad preview to see it work you need to preview them in the ios or in te android viewer

  • colandercolander Member Posts: 1,610

    It is much better to do this with tables and they are reliable. Look for the Tables video here

  • mshuraih mshuraih Member, PRO Posts: 179

    I looked over the forum and seems some people has similar issues .. and finally i was able to figure it out .. SO here is what the deal after many trials and erros .. the save attribute is present at actor in the game scene so once the game kicks in it will save the default numbers ( before the score is changed) .. i have rules to save the score when the game is over or won ..etc so this is how the key gets updated ... but if u just exit the game in the middle of the play without an event that will trigger the save attribute then when u reload it will re load the default value that was saved in the first place .. so to keep track of the score and come back to the same value i created actor who keeps updating the save attribute everytime the score changes .. and it works

    thanks all!
    :)

Sign In or Register to comment.