How to reset game score from pause menu

Idratherfly2000Idratherfly2000 Member Posts: 8
Ive read every single post in the forum and cannot find a complete solution. In my game, when the player loses, I bring up a Pause Scene which goes to a scene I created that says they lost and has a reset button. When the reset button is pushed it Changes Scene back to the level so they can try again. The score obviously does not reset, so I input Change Attribute game.score=0 when the reset button is pushed but this does not reset the score when you go back to the level. Am I doing anything wrong? Is there a work around for this? Thank you very much.

FYI- All other posts have not discussed using a Pause Screen like in my scenario

Comments

  • zombieaddictzombieaddict Member Posts: 213
    in your rules in what order have you got it setup? if you've got the reset taking place before the change attribute game.score=0 then try moving that up the top. if that doesn't work try delaying the reset with a timer.

    so do change attribute game.score = 0 first
    .
    and after that have

    timer - after 0.1 seconds (or some other short time)
    reset
  • Hi Zombie,
    I tried what you were saying,
    Actor touch is pressed (RESET BUTTON)
    Change Attribute game.score =0
    Timer .5/Change Scene (to scene they just played)

    When I tried that, it did not change the scene nor the score, the reset button did not do anything basically.
    Ive tried taking out the timer, and putting Score=0 before Change Scene and vice versa. Still no luck. I wonder if theres anything else I can do, I guess I just need to make the Reset button spawn inside the scene instead of the game resorting to a Pause Game. I have tried that and made my Reset Button only reset my score. Still does not work!

    When actor is touched (reset button)
    Change Attribute Game.Score to Game.Score=0

    Still does not change my score! Not sure what I am doing wrong here.
  • hamsterflyhamsterfly Member Posts: 1
    Try to set the rule to "touch is released" instead of "touch is pressed" for your reset button
    and use the timer as Zombieaddict said.... it should work,
    touch is pressed wouldn't work because you should hold the touch till the timer starting time
    for example if you set the timer to 0.5 sec so you have to hold the touch for half a second in order to start the rule.
    hope that's helpful
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    Try to put the Unpause Scene behavior instead of the change scene.

    ________________________________
    【ツ】iPhone Icon Pack (compatible with DBA Icon Creator) 【ツ】 - 【ツ】Graphic Pack【ツ】
    Free GS demo: High score simple and advanced; Game Center; App Rating System
Sign In or Register to comment.