Time reinitializes at level Gamesalad

feromanferoman Member, PRO Posts: 130
edited November -1 in Working with GS (Mac)
Hello,
in my game, There are stages with TIMER,
Once the time reaches 0, the stage will end with the message "Finish"
and returns at a scene of "Result Score", then choose "try again".

My problem, after "try again", I returned to the scene, but I can not play, and after 2 seconds, the game returns to the scene "Result Score"
because the timer is at 0 after my second passage in the scene.
Which I had condition an "once time reaches 0, the stage will end with the message" Finish "
and returns at a scene of "Result Score."

HOW TO REPLAY THE SCENE WITH THE TIME initializes without leaving the game, Of course?

Comments

  • SamXOOO7SamXOOO7 Member Posts: 47
    The only thing I can say without seeing you code is when touch is pressed on reset button change attribute Timer to (whatever your original start time for the scene was).
  • quantumsheepquantumsheep Member Posts: 8,188
    SamXOOO7 said:
    The only thing I can say without seeing you code is when touch is pressed on reset button change attribute Timer to (whatever your original start time for the scene was).

    Yep, that should do it.

    Additionally, make sure any other attributes that need reseting are put in this button - such as your 'score' for example.

    QS :D
  • feromanferoman Member, PRO Posts: 130
    I put a button "return" in the scene "complete level", my code is "when I press this button, I change the scene" previous scene. "
    Once on the scene rest the counter at 0, and is not reset.
    "Reset Game", I do not want
    and "Reset Scene" resettable the scene "complete level" but I want to start "level 1" with counter eg 40 seconds.

    Do you have an idea my solution?
  • quantumsheepquantumsheep Member Posts: 8,188
    We've given you the solution!

    When you press the button to change scene, immediately before the change scene behaviour you should put in a change attribute behaviour that changes the timer to its original value.

    Cheers,

    QS :)
  • feromanferoman Member, PRO Posts: 130
    I made some tries, but not succeeded.
    Did you ever try for one of your games, if not try to see.
    Give me news if you already try.
  • kianuskianus Member Posts: 9
    When you press the reset button you should add a "change attribute" to whatever number your timer needs to be at..

    I have that in my scenes and its working perfectly.

    Example:

    when replay pushed
    change attribute.timer to 25
Sign In or Register to comment.