Switching between layouts

Get help using Construct 2

Post » Fri Nov 02, 2012 12:55 am

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?
B
25
S
5
G
3
Posts: 446
Reputation: 5,633

Post » Fri Nov 02, 2012 2:56 am

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.
B
18
S
9
G
5
Posts: 77
Reputation: 4,946

Post » Fri Nov 02, 2012 3:23 am

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 :)
B
25
S
5
G
3
Posts: 446
Reputation: 5,633

Post » Fri Nov 02, 2012 3:24 am

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?
B
25
S
5
G
3
Posts: 446
Reputation: 5,633

Post » Fri Nov 02, 2012 9:12 am

@farflamex
Well, it mostly depends on how many objects are moving.
Give it a shot and see what you come up with.
B
18
S
9
G
5
Posts: 77
Reputation: 4,946

Post » Fri Nov 02, 2012 2:00 pm

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 :)
B
25
S
5
G
3
Posts: 446
Reputation: 5,633


Return to How do I....?

Who is online

Users browsing this forum: blackhornet, TheHat and 1 guest