Help understanding Layouts [Solved]

Get help using Construct 2

Post » Thu Jul 10, 2014 6:36 pm

Hello,

I have two layouts, one for the game and one for setup using the same event sheet. I want the setup layout to load first, so I ordered it at the top, but if I then preview the game and enter the game layout portion, and end there - then make some edits and then re-preview, it doesn't start at my setup layout.

So I added first thing
system -> On start of layout -> Go to SetupLayout

However, when I do this my AJAX calls at the beginning of the game never complete. (I may have created a circular loop). If I disable the above action, it works just fine. Here is the relevant code, with the action that causes the problem disabled:

Image

How can I ensure the right layout is always loaded first?

Thanks for your help.
Last edited by kbtbc on Thu Jul 10, 2014 7:03 pm, edited 2 times in total.
B
11
S
2
Posts: 86
Reputation: 1,001

Post » Thu Jul 10, 2014 6:44 pm

Go to the project properties tab, under Project Settings there is "First Layout", specify it in there.
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Thu Jul 10, 2014 6:47 pm

Awesome -- thanks.
B
11
S
2
Posts: 86
Reputation: 1,001

Post » Thu Jul 10, 2014 6:48 pm

... except it was already set to that.
B
11
S
2
Posts: 86
Reputation: 1,001

Post » Thu Jul 10, 2014 6:53 pm

Are you running the project or just running the layout? By default, C2 previews the last Layout used.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
137
S
31
G
87
Posts: 5,555
Reputation: 60,454

Post » Thu Jul 10, 2014 6:55 pm

@kbtbc If your "setup" layout doesn't use the same exact events as your "game" layout, then I would separate the single event sheet into two event sheets. Easier to manage; less hassle and headache.

If you intend to keep one event sheet, may I suggest separating your "setup" and "game" events in separate groups so that you can effectively use the "Set group active" action. Activating and deactivating certain groups when needed should help.
yupenglee.com | @JustOnlyYu
B
14
S
3
Posts: 16
Reputation: 872

Post » Thu Jul 10, 2014 6:59 pm

@zenox98 -- yes - that makes some sense, since both layouts use the same event sheet I wasn't expecting that -- but that was it.

@arthology -- I love groups and just yesterday organized all my events into them -- makes it much more easy to follow and activate/deactivate sections of the project. Great advice!
B
11
S
2
Posts: 86
Reputation: 1,001


Return to How do I....?

Who is online

Users browsing this forum: Seruza and 8 guests