0 Favourites

How do I control 2 layout with 1 event sheet.

  • 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.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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.

  • 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.

  • 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

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

    Here is my CAPX. Hope you guys can help me out.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)