Objects lost when switching layouts?

This forum is currently in read-only mode.
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hi!

    Short version:

    When I switch between two layouts, the objects that where placed on the first layout are gone, when I switch back to it. Why is that, and how do I prevent this?

    Detailed version:

    I have two layouts, solar system view, galaxy view. Stars in the galaxy view are randomly placed and named. If I click on a star, I save some information about it in a global variable (some times later it will be an array containing the info about planets and so on) and change to the "Solar view"-layout, which adjusts its contents according to the global variables. If I go back (via go to layout) all the stars I generated before, are gone! Why is that? What can I do to prevent this?

    As always, heres the actual *.cap I'm working on: http://dl.dropbox.com/u/12049513/Construct/GE/alpha.cap

    It works like described above.

    Please advise! Much "thank-you"s in advance!

    Best regards,

    Noel

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try reading the "Part4: Layout Transitions" off of this link:

    It covers different aspects of moving between layouts and should give you some ideas on how to do it. Basically, any object that is placed on a layout at build time will always be there when you return to it (even if you had previously destroyed it) and any object that is placed dynamically will always be gone when you return to it. The tutorial covers one way to address those problems.

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