Button

Get help using Construct 2

Post » Sat Jun 23, 2012 4:37 pm

I added a menu layout, added it to start after the loading, added a button to test it writing START on it, and made event (on clicked - go to layout (named) level 1). i start the game, it loads me to the menu layout but when i press the button nothing happens. any suggestions, help? zoniq2012-06-23 16:38:46
B
6
S
1
Posts: 29
Reputation: 558

Post » Sat Jun 23, 2012 4:50 pm

Did you type the exact name of the layout, with double quotation marks?

Example: "Layout 1"

By the way, if you use the other go to layout action (not named), you can select which layout you want to go to, without having to type anything.Nimtrix2012-06-23 16:51:33
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sat Jun 23, 2012 4:53 pm

tested both nothing still :/
B
6
S
1
Posts: 29
Reputation: 558

Post » Sat Jun 23, 2012 5:03 pm

Use this:

Mouse>Object Clicked>Start_Button_Name>System>Go To Layout>Choose_Layout_Name_From_The_Drop_Down_Menu
B
10
S
3
G
3
Posts: 45
Reputation: 2,994

Post » Sat Jun 23, 2012 5:15 pm

nothing still
B
6
S
1
Posts: 29
Reputation: 558

Post » Sat Jun 23, 2012 5:23 pm

Always best to upload the code. Most people use dropbox.com. You'll see examples all over the forum.
ImageImageImage
B
71
S
22
G
258
Posts: 3,791
Reputation: 143,198

Post » Sat Jun 23, 2012 5:24 pm

okzoniq2012-06-24 05:36:32
B
6
S
1
Posts: 29
Reputation: 558

Post » Sat Jun 23, 2012 5:32 pm

Your "Menu" layout has no event sheet assigned to it.

Edit: See manual enty on Layouts and Event Sheets.Nimtrix2012-06-23 17:35:30
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sat Jun 23, 2012 5:33 pm

Two things: You need to set the Event sheet on the Menu layout, and you should use the On clicked event for the button itself, rather than a mouse event.
ImageImageImage
B
71
S
22
G
258
Posts: 3,791
Reputation: 143,198

Post » Sat Jun 23, 2012 5:43 pm

Thank you very much guys i thought it was automatically targeted to the sheet im working on with it.. it works like a charm :D
B
6
S
1
Posts: 29
Reputation: 558

Next

Return to How do I....?

Who is online

Users browsing this forum: facecrime and 7 guests