Change Scene to referring scene

FetaboyFetaboy Member, PRO Posts: 191
edited November -1 in Working with GS (Mac)
I made a keyboard in my game as a new scene which I call from various other scenes. It would be awesome if the 'Change Scene' behavior had an option to return to the scene which called it. I suppose a workaround would be to simply create an attribute to store the referring scene and write some rules based off of that.
Thanks.

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    Yeah - you can give each scene a name stored in a variable.

    When you're in that scene, have the game remember what it's called.

    So if the variable is 'scene number' and you're in scene 1, it'll change the variable: Scene Number = 1.

    Then on your paused screen - your keyboard in this case - when you exit that scene, have a set of rules that say

    'If Scene Number = 1' then change scene to scene 1

    'If Scene Number = 2' then change scene to scene 2

    etc

    I'm eager to see your keyboard! Quite an ambitious start to your GS career ;)

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

  • FetaboyFetaboy Member, PRO Posts: 191
    Using a scene variable is what I ended up doing. The keyboard itself is working perfectly. The game is kind of ambitious and probably won't be done for a few more months. I'm waiting for the tool to test it on my iPhone to come out before I do much more work on it as I need to see what the performance is like with the physics engine on the actual phone.
  • quantumsheepquantumsheep Member Posts: 8,188
    Sounds intriguing, sir! Look forward to it :)

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

Sign In or Register to comment.