Switch between layouts

Get help using Construct 2

Post » Tue Apr 02, 2013 7:41 pm

I`m making an RPG game where the main game field and character statistics are on the different layouts (well, i thought it`s possible). But now i faced the problem: switching to stats layout and back sets my main layout to the default state. And that`s a drama for me.

So, the question is: what am i doing wrong? How to switch between layouts without losing it`s vurrent state? Or, if it`s impossible, how can i solve this problem?
B
7
S
2
Posts: 49
Reputation: 982

Post » Tue Apr 02, 2013 7:52 pm

1.- You can use a GUI layer that hides/unhides, no need to switch layouts
2.- Are you storing stuff in global variables?
B
18
S
5
G
4
Posts: 568
Reputation: 5,079

Post » Tue Apr 02, 2013 8:02 pm

1 - i`m afraid gui layer will make hard lags when switching (but im not sure and i can`t check because project is on the designing stage)
2 - some in the global variables, some in dictionary
B
7
S
2
Posts: 49
Reputation: 982

Post » Tue Apr 02, 2013 8:23 pm

Oh, i`m so happy, look at the today`s update:

Second, the new Persist behavior allows you to make persistent layouts. Normally if you leave a layout then return to it, all its objects have reverted to the initial state as you designed in the editor. Sometimes this is annoying if you want, say, the player to return to a previous level but with all the enemies they killed and powerups they collected still gone. Now you can simply add the Persist behavior to objects you'd like to remember - in this case, the enemies and powerups. Then on returning to the layout, all those objects are exactly as you left them.

Yay!
B
7
S
2
Posts: 49
Reputation: 982

Post » Tue Apr 02, 2013 8:53 pm

I was going to say, if there're less than ~10 layouts total to switch and your game screen isn't large, it shouldn't be a problem to squeeze them all into one layer. But that Persistent Layout is still many sorts of useful.
B
19
S
6
G
1
Posts: 116
Reputation: 2,730

Post » Wed Apr 03, 2013 6:43 am

yozzik Check today's update
B
18
S
5
G
4
Posts: 568
Reputation: 5,079

Post » Wed Apr 03, 2013 7:33 am

@California the last post done by @Yozzik talked about the update with the persist option :)
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,418


Return to How do I....?

Who is online

Users browsing this forum: michaelverdi and 29 guests