Save on one layout, go to another layout -save, then go back

  • Say I save on the layout Level, to save the positions of the objects and also the variables.

    Then enter another layout called Store. I buy something and then go back to the layout Level. To remember that I bought something I save on the Store layout.

    But when I go to load the Level layout, the game of course loads the game when it was on the Store layout. So I go straight back to the store.

    How can I possibly fix this?

    Thanks.

  • I'm not sure if this a good method, but it seems to be working:

    Create an object (sprite for example), set Global=Yes, add NoSave behavior to it.

    Add instance variables that will store the items you bought. When player buys something in the shop, put it in these instance variables.

    In "On Load Complete" event read these variables and add the items to player's inventory.

    Or I guess you can do this with Local Storage. When exit from the shop, write all inventory into the local storage.

    In "On Load Complete" load inventory from the local storage.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you so much! Truly appreciate it! Will try sometime on the weekend, I'm quite busy with homework at the moment.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)