Using only one scene for a level menu?

GuaveMediaGuaveMedia Member, PRO Posts: 1,262
edited November -1 in Working with GS (Mac)
Hey everybody,

in my game I have 15 levels, and at the moment I have for each level a own scene working as the "level menu" with, continue, restart and go back to levels.

The menu in each level is showed up when a button is pressed. Is there a chance to have only one menu?

If yes, how to do with attributes in the each scenes and so on?

Thanks for help :)

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    All you have to do is in each level, put in an integer variable called 'level' and change it to whatever number that level is.

    So on level 1, you'd put in a behaviour *somewhere* that says "Change level to 1'

    On level 2 you'd put in a behaviour somewhere that says 'Change level to 2'.

    And so on and so forth for every level.

    This way, the level number gets changed depending on what level you're on.

    Then, in your 'level menu' screen, in your 'retry' button you'd have the rules:

    If level = 1 AND button is pressed - go to level 1
    if level = 2 AND button is pressed - go to level 2

    And so on and so forth.

    On your 'continue' button, have rules that say:

    If level =1 and button is pressed - go to level 2
    If level = 2 and button is pressed - go to level 3

    And so on and so forth.

    That should help you out.

    QS

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • FrontRoomGamesFrontRoomGames Member Posts: 116
    I have the same thing as you, but i have a single image with all 15 levels on it.

    but are you asking like at the end of a scene the menu that pops up? or like when you go to choose a level?
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    I mean the menu that can be chosen during a level, to go back to the main menu or go back to level view and so on....
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    But the problem is the following @quantumsheep:

    To continue the level I need the behavior "unpause game"...

    Does this also work with your suggestion?
  • quantumsheepquantumsheep Member Posts: 8,188
    Alex0407 said:
    But the problem is the following @quantumsheep:

    To continue the level I need the behavior "unpause game"...

    Does this also work with your suggestion?

    In Sunshine, I use the above technique in one scene called 'EndOfLevel' - this allows you to go back to the menu, or continue.

    This scene is called at the end of a level by Pausing.

    You can use 'Change Scene' when in a pause scene. So yes, it should work fine.

    Cheers,

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

Sign In or Register to comment.