How do I control 2 layout with 1 event sheet.

Get help using Construct 2

Post » Mon Jun 30, 2014 5:16 pm

Hello everyone. First time posting.

My problem is when my player hit an object, i wanted it to appear on layout 2. How do i do that. ?

Eg. Rocketship collide with object. The object will appear in layout 2.

Thanks.
B
9
S
2
Posts: 40
Reputation: 673

Post » Mon Jun 30, 2014 5:29 pm

On the layout's properties, you can select which event sheet is associated with it. Or, if you have an event sheet for the new layout already, you can include another event sheet in that event sheet by right clicking on the event sheet to get a context menu, then selecting include sheet.
B
21
S
5
G
1
Posts: 96
Reputation: 1,937

Post » Mon Jun 30, 2014 5:32 pm

When you create a second/third.... layout, Construct asks if you want to add another event sheet, in your case, select no. Now, select you new layout and in the properties tab, you can set the working event sheet for that layout.

You can see my example and test other stuff, but that's the simplest way to do what you want to. You can even compare LayoutName if you want some stuff to only happen on certain layout.
You do not have the required permissions to view the files attached to this post.
B
21
S
5
G
3
Posts: 53
Reputation: 3,335

Post » Mon Jun 30, 2014 5:35 pm

And in System actions you will find "Go to layout" under "General" so you can jump from this layout to that one. You should use a technique like donelwero suggested (compare LayoutName) though, since both layouts may call this event.
There is also "Go to Layout (by name)" which you dynamically generate the name of which layout you want to open. like:

"Level" & MyVariable

which would be "Level2" if MyVariable = 2
B
239
S
62
G
33
Posts: 903
Reputation: 40,562

Post » Mon Jul 07, 2014 3:55 pm

Hi, Thanks for the reply. Still I am a bit confuse.

Here is my CAPX. Hope you guys can help me out.
You do not have the required permissions to view the files attached to this post.
B
9
S
2
Posts: 40
Reputation: 673


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 19 guests