How to make a scene layered ontop of another scene.

Hi, I saw this video where somebody had a separate scene with an inventory on it, when they clicked the inventory button it switched scenes.. however it didn't take up the whole screen and you could still see the game scene behind it. How did he accomplish this? When making a new scene, it seems to complete cover up the old scene. Thanks!

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    They used the Pause Game behavior. It overlays another scene and then when the game is unpaused, it removes the overlay.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • ElDaltonElDalton Member Posts: 21

    @tatiang said:
    They used the Pause Game behavior. It overlays another scene and then when the game is unpaused, it removes the overlay.

    Got it, but in that case say I click the inventory button and it opens the inventory, but it also has other buttons that stich the scene to other screens such as stats, quests, etc. How do I make it so it switches between the scenes while keeping the main game still paused in the background? Thank you!

  • SLOCM3ZSLOCM3Z Member Posts: 797
    edited December 2015

    You can pause it as many times as you want(from what I have done). But you'll have to have an unpause button too.

  • ElDaltonElDalton Member Posts: 21

    @jdlcrater said:
    You can pause it as many times as you want(from what I have done). But you'll have to have an unpause button too.

    When I click the inventory button it opens the inventory, but when you click the tabs to switch to the different screens (scenes) it keeps the inventory scene still open in the background and pauses that scene too. Any simpler way?

  • SLOCM3ZSLOCM3Z Member Posts: 797

    You could use a boolean? So, this is how I am thinking: game.Paused boolean or integer. In the pause scene have the button that you want to change to the stats scene have rules like this:
    when touch is pressed
    :do:
    change attribute game.Paused to 1
    (timer-after-.001 :do: unpause game)

    Then have one of your actors in the unpaused scene have a rule that says:

    if game.Paused = 1
    :do:
    pause game-show scene-stats

    Then in your stats scene, in your back button, have a rule that says:

    when touch is pressed
    :do:
    change attribute game.Paused to 0
    (timer-after-.001 unpause game)

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    . You can't have more than one scene at a time everything is scene based in GS. To do what you want you would have to incorporate all that stuff on one scene.

  • markahoathmarkahoath Member, PRO Posts: 9

    Say you need 4 "Screens". Just create a Massive Scene (say 2 x 2) and move the camera when you need to go to a different "Screen" to show the area that has been navigated to. Clunky but it will work !

Sign In or Register to comment.