scene menu and remembering previous scene?

eddysparkseddysparks Member Posts: 24
edited November -1 in Working with GS (Mac)
Ok a harder task in question now.

Imagine i have multiple scenes for instance 20. I want to go from scene to scene in order which is relatively simple.... but..... i want to have a button that will take me to a scene menu that will allow me to go to any of the 20 scenes. BUT ALSO return me to what ever scene i was prior to going to the scene menu.

Does anyone have any examples of how to do this or something similar?

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Create a game integer attribute called currentScene

    Have a behavior in each scene that says change attribute game.currentScene to ___

    In each scene fill in the blank with a number that represents that scene.

    Then in your menu have a back button actor that has the rule:

    Rule - when touch pressed
    --------Rule - when game.currentScene = 1
    -------------change scene to level1
    --------Rule - when game.currentScene = 2
    -------------change scene to level2

    and so on
  • eddysparkseddysparks Member Posts: 24
    thanks :) brilliant :)
Sign In or Register to comment.