Going to the next layout

  • So if you have a layout that occurs in between levels is it possible for it to go to different levels depending on what the layout before it was. For example if you have a "You Win" screen after you beat a level can you make it go to different levels depending on what level you beat? I wanna know so I can cut down on the amount of layouts.

  • Global variables. Look it up. That is all.

  • I know it concerns global variables. What I want to know is how? I can check the whole manual but, it would help to know what to look for.

  • What, how to declare a variable or the logic you could use around one?

    Just right click event sheet, add global variable.

    It's then global to all event sheets, not just the one you create it on.

    So with that in mind.. one way to make it work..

    Curr level layout start - assign global variable to "Layout1"

    On victory load "you win" layout

    On "you win" layout, check the global variable (system>compare variable). If it is "layout1" then load "Layout2". If it is "Layout2" then load "Layout3" and so on.

    If you are using numbered layouts as above, you can massively cut down on the events by storing level number, adding 1 to it, and concatenating your new name then use System>Load Layout by name.

    e.g.

    1, My layouts are called "MyLevelX" where X = level number

    2, I load level 2. My global "LevelNo"is set to 2. I beat level 2.

    3, In my "victory" layout I load the next layout by name simply as "Mylevel" & LevelNo+1 (which makes a string "MyLevel3" in this case).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Any joy?

  • Ah that makes sense. Thanks for the help!

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