Reset from previous screen

triton13triton13 Member Posts: 161
edited February 2012 in Working with GS (Mac)
Hey guys, if I wanted to make a Reset Button from the previous screen would I do this : Make a boolean attribute, go to my restart button and have it say, when touch is pressed, gameReset = true and change scene to next scene. Then would I go to my actors and in them put all of the rules under gameReset = true?

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2012
    Hi @triton13, providing that you've not got any saved attributes loading at the start of a previous level, then you don't need a Reset Scene button at all for a previous level... just by going to that previous level will start it as new again.

    (If you wanted to reset the level you're on, then you'd use the Reset Scene Behavior mid-scene, where you wanted.)

    ----------------------------------------------
    http://davidgriffinapps.co.uk/

    iPad: End of the Earth game coming soon to the iTunes App Store....

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • triton13triton13 Member Posts: 161
    Well, I have my actors and everything moving around. When the scene starts, there is a "Paused Screen" so when you tap it, everything starts. If you lose that level, it takes you to a restart screen. When you click restart, everything start before I tap the screen. =/
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    edited February 2012
    You have to change your game start attribute back to false with a change attribute behavior when you click restart
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    It's a bit of an unusual use of Pause Scene behaviour, to have it at the start of a level. Maybe put the pause scene behaviour in a Pause button on each scene, and delete the pause scene behaviour to start a scene. (Personally, I'd get fed up having to start each scene, I'm guessing other users would too..)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • triton13triton13 Member Posts: 161
    The "Paused Scene" is just an actor that I have that's see through and a little dark so it makes the whole scene dark. The reason it's there is, as soon as someone would hit start from the menu, the scene would start and I don't think they would be ready because it's timed and you don't have a lot of time. I just want to make a reset button that when you fail, it will reset everything including all my attributes and go back to that level.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2012
    I see: well I don't know why a previous level won't start as you want with your pause button in place; providing that when the user fails, you've either used Reset Scene for the same level to start fresh, or Change Scene to go back to a previous level to start fresh, they should start again as new, either way, a pause button at the beginning or not....

    So sorry, can't help further with that; there has to be something not right with the Rules maybe but without seeing them I don't know what that might be.

    PS as John wrote, don't forget to change you GameReset attribute back to false at the beginning of the level(s); although even without this, I can't see why it's not working as you want.... hopefully another member can shed more light....

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • triton13triton13 Member Posts: 161
    I want to do a Reset Scene but here's my problem with that. When I click the wrong thing and it resets the scene. My scene starts automatically and when I do the objective for the scene, it doesn't even count. When I say that, I mean that it doesn't go to the next scene like it's supposed to.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2012
    So we're talking about starting the same scene again and not going back to a previous scene now?

    OK, Have you an integer attribute that determines whether or not to the scene restarts; or a timer?

    If its an integer attribute, you'd set it's value at 0 (default setting anyway). If the level allows the user progressive mistakes until a maximum amount is reached before restarting the level, then when a mistake is made - (this is all off the top of my head not knowing what type of game you're making or how it plays) - you'd put in the rules somewhere:

    change attribute Maxmistakes to MaxMistakes +1
    When MaxMistakes = 10
    Restart Scene

    and for going to the next scene, there surely must be an indicator of success like a timer or another integer count, so we'll add stuff:

    When SuccessPoints = 5
    Change Scene

    Something along those lines: hope that helps out.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • triton13triton13 Member Posts: 161
    The attributes that I have are a countdown timer and another one that counts if something is clicked. I have the scene setup so if you click the actors that count (we'll call it gameCount) then when all the actors are click it proceeds to the next level. If the time runs out or the wrong actor is clicked, the scene resets. Now when it resets, I can click the actors I'm supposed to and the game keeps playing and won't proceed to the next scene even though I beat the objective. That's my problem =/
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2012
    Oh, that should be straightforward enough: make a boolean called, let's say, LevelFinish. Now, in all the relevant actors' rules, just after When touch is pressed, put When LevelFinish is false before any other behaviours.

    And add to the 2nd bit of rule I suggested:

    When SuccessPoints = 5
    Change attribute LevelFish to true
    Change Scene

    -----

    don't forget to add at the beginning of all levels:
    Change LevelFinish to false

    as well as resetting your other attributes like SuccessPoints and MaxMistakes (or whatever you've called them)

    :-)

    Edit: "LevelFish".... ha!! The wonder of predictive text! I like it, it's got a certain ring to it..... "levelfish......levelfish..... ;-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • triton13triton13 Member Posts: 161
    Also, my actors don't stay paused after it's reset. They're moving all around.
Sign In or Register to comment.