Switching between layouts

  • Am I right in thinking that whenever you switch between layouts, everything in the layout starts with it's starting values? I have a situation where I want to be able to switch between my main screen and a sort of 'management' screen. When I switch back to the main screen, I want everything to continue as it was. Is this possible, or will the switch go back to the beginning and if so, is there some way I can restore the positions etc back to how they were? I'm guessing I might have to use globals or arrays or something like that to save and reload the information?

    Also, when I'm on the main screen, I want to be able to take information from the management screen. Again, is this possible or does the management screen effectively not exist while the main screen is up?

  • I was going to suggest that you pause the menu screen and resume when you return, but that won't work when switching layouts, but it will work if you use layers you can.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah yes, layers, I didn't think of that. What I basically need is both screens to be 'active' at the same time. So I guess what I'd do is have everything for my menu screen on it's own layer and simply have it invisible while the main screen is visible, and vice versa? Whew, I was worried that I'd come across a real problem, but I think that will work :)

  • Just thinking, would there a performance hit with this? Having an inactive layer sitting around in the background, while it's being processed, I assume the graphics are effectively ignored, even though the objects keep moving around?

  • farflamex

    Well, it mostly depends on how many objects are moving.

    Give it a shot and see what you come up with.

  • Works perfectly. Glad I asked on here because I'd gone stupid and was coming up with all sorts of bizarre solutions in my head. This is the obvious and simple way, thanks :)

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