0 Favourites

Layout issues

This forum is currently in read-only mode.
  • I am still relatively new to Construct, so this question may be really stupid.

    In my game I am trying to figure out a way to create a separate layout in the game while also keeping the same state in the original layout. I have a "main" layout, where the player controls his space craft in a top down view. On this layout there are planets, where I want the player to be able to land. I am not sure on how to do this.

    Originally I created a separate layout on which the player can fly about on the planet. This is fine, as having the same object "Game Controller" on every layout (same object) means I can have private variables stay the same between each layout. But when I set the planet layout to go back to the main layout, obviously the main layout resets to its original state. Is there any way I can freeze the main layout while the second layout is opened?

    I experimented with the Layout object, having a layout open in a separate windows or over the top of the main layout, and with this I could pause the main layout as well. But, this causes problems as buttons do not work on the new layout and scrolling does not occur. I don't know if I am doing something wrong or the layout object isn't the way to go

    Any help would be greatly appreciated

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Hi,

    Looks like you are making some cool space games! That is my favorite game type.

    I experienced the same problems you had when trying to have the spaceship land on planets, but still return to a non-reset game layout.

    I ended up making a separate layout for the space world and the planets and then used global arrays and hash tables to keep track of the state of the game world while moving from one layout to the next.

    I show a version of doing this in the Mikey Adventure tutorial in Part 4: Layout Transitions.

    Hope this helps!

  • Thanks, this looks like exactly what I need!

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