How do I go to a layer in a different layout?

0 favourites
  • 5 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • So I have 2 layouts. Game and TitleScreen. TitleScreen has 2 layers

    1.Main

    2.About.

    Game has only 1

    1.Game

    Now there is an about button on Game. If I press about it should go to layer 0 ofTitleScreen which is about. Any way to do this? Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can have a variable to check which button is clicked.

    Then you compare the variable and show the corresponding layer.

    Example:

    Global variable layerDisplay

    If layerDisplay = 0 => Layer Main Visible, Layer About Invisible

    If layerDisplay = 1 => Layer Main Invisible , Layer About Visible

    If Main clicked => layerDisplay = 0, Go to Layout TitleScreen

    If About clicked => layerDisplay = 1, Go to Layout TitleScreen

  • You can have a variable to check which button is clicked.

    Then you compare the variable and show the corresponding layer.

    Example:

    Global variable layerDisplay

    If layerDisplay = 0 => Layer Main Visible, Layer About Invisible

    If layerDisplay = 1 => Layer Main Invisible , Layer About Visible

    If Main clicked => layerDisplay = 0, Go to Layout TitleScreen

    If About clicked => layerDisplay = 1, Go to Layout TitleScreen

    How do you call a ayer by name?

  • You only need to set layer visible.

    System > layer "About" visible When start layout.

  • You only need to set layer visible.

    System > layer "About" visible When start layout.

    Got it thanks!

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