Save/Load between Layouts

  • I have two layouts (1 and 2). The idea is to go from one layout to another at any time.

    I'm using SAVE / LOAD for it.

    example:

    (LAYOUT1)

    keyboard Z ------- system > Save game to slot "1"

    ------------------ go to LAYOUT2

    Start Layout ----- system > LOAD game from slot "1"

    (LAYOUT2)

    keyboard X ----- system > Save game to slot "2"

    ------------------ go to LAYOUT2

    Start Layout ----- system > LOAD game from slot "2"

    ___

    When I go from one layout to another I get back to the correct position, ok.

    But for example, I caught a Layout 2 any object (I used a global variable), but when I go back to Layout 1 I can not see the object that caught the Layout2 because he goes back to where it was saved, and does not understand the new object variable.

    could anyone help with this?, or maybe I'm doing completely wrong and maybe change logic

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need to give your objects the Persist behavior, then you wont have to worry about saving between layouts (unless you want to be able to quit the game and start it up later at that spot).

  • AllanR: thanks man, the Persist Behavior works perfect!

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