how do I switch the order of layouts?

Get help using Construct 2

Post » Mon Jul 07, 2014 6:36 pm

Hi, I have a problem with "go to layout"

I created my game in layout 1.

But made my start screen "press any key to start game" in layout 2.

Pressing any key isn't working. I think because the computer is getting confused. How do I change their order, how do I switch layout 1 with layout 2?

(Also the the player controlls are stuck because of the first event"go to layout". When I remove it, the game works fine.)
Last edited by meman on Mon Jul 07, 2014 8:47 pm, edited 3 times in total.
B
5
Posts: 43
Reputation: 403

Post » Mon Jul 07, 2014 7:29 pm

Try renaming the layout.
B
9
S
2
Posts: 40
Reputation: 673

Post » Mon Jul 07, 2014 7:36 pm

I already tryied that, doesn't work. Thanks for your suggestion @neilgomes
B
5
Posts: 43
Reputation: 403

Post » Mon Jul 07, 2014 7:57 pm

Have you check the event sheet. Must be link to either of the layout.

Can you provide the CAPX file?
B
9
S
2
Posts: 40
Reputation: 673

Post » Mon Jul 07, 2014 8:13 pm

You can use the layout name when changing layouts, instead of the number.
Change 2 for "whatever_the_layout_is_called" , the name must be between " " (not sure what it's called in english), since it is a string.
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 » Mon Jul 07, 2014 8:15 pm

Go to project settings and change the "First Layout" to your start screen.
Anyway, the problem probably is in your code.
B
20
S
4
Posts: 385
Reputation: 2,270

Post » Mon Jul 07, 2014 8:28 pm

@nailgomes, @caiorosisca, @Zathan I have attached the download link, have a look at the file and help me figure out what's wrong please.
B
5
Posts: 43
Reputation: 403

Post » Mon Jul 07, 2014 8:37 pm

Layout2 has no event sheet linked to it.
Create a new eventsheet, move the event that changes layout to that event sheet (remove from Event Sheet 1).
Click on Layout 2 and set it's event sheet to the new one you created, in the layout properties window.
On the project properties windows search for Start layout and change from default to Layout 2_start.
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 » Mon Jul 07, 2014 8:45 pm

Thank you so much @caiorosisca !! It worked :D I appriciate your help a lot!
B
5
Posts: 43
Reputation: 403


Return to How do I....?

Who is online

Users browsing this forum: Clark Thy Lord and 1 guest