How do I

0 favourites
  • 10 posts
  • Hello guys, please does anybody know how to go from one layout to another layout ? Thanks

  • event sheet

    action: system -> go to layout

  • Do u an idea of a capx to do that? because I know it involves instance variable ,botton and event.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thanks, but I can't view the image u posted.anybody with another idea I will be glad.

  • thanks, but I can't view the image u posted.anybody with another idea I will be glad.

    What's wrong with the action:

    system : go to layout...?

    The only action you need is the above, the event and or conditions are up to you to decide..

    You want to use a button?

    on button pushed - system go to layout

    If there is more to your question, it would be helpfull if you explained..

  • thankslic@little stain, I intend to use botton but am confused about the instance variable of the botton in the layout,I understand the event aspect.

  • What instance variable do you mean?

    Are you using some kind of template or following a tutorial?

    An instance variable isn't needed, but you could ofcourse give the button an instance variable..

    In that case I would go for text and input the name of the layout you want the button to refer to as the text/string

    Then you could use the action goto layout by name : button.instancevariable

  • personally i use make layer invisible, and disable solids (on have a on layer visible event)

    (by this i mean have an event for each layout visible/ invisible that sets things on the layout to solid enable/disable)

    so when you (if its an rpg style map movement system) on collision with the next layout sprite, make the current layout invisible, make new layout visible and then set position of player.

    made a good town to wild game with this, also transfers to battle system layout lovely, while holding the players current location! (ps disable player movements if u are using it for a battle system)

    i got bored so like most things went into making something else after.

    hope this helps

  • You can just leave the "instance variable" of the button on its properties. If you want to use a button to go to another layout I think this should be it.

    Scenario: Layout 1 with Button1, Layout 2

    Event sheet of Layout 1

    condition: button1|on click

    action: system-> go to layout -> Layout 2 (Go to Layout 2)

    here is a sample of that:

    dropbox.com/s/ihttjidq3b8zb1s/sample.capx

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