how do i get my timer only to start when your in the scene?

johnydeejohnydee Member, PRO Posts: 196
edited November -1 in Working with GS (Mac)
so i have two timers in my game in two scenes.But lets say one one of my scenes the timer is at ten seconds and i have scene two with 12 seconds.When iam in the first scene my timer from scene two is counting.How do i get it to only count down when the player goes to that scene?

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    A timer will not run from a scene that is not loaded. Can you be more specific about what you are actually doing and how your have it all setup?
  • johnydeejohnydee Member, PRO Posts: 196
    well i followed t shirt booths timer video.It works fine but the timer in the next scene is counting down and i dont know why..
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    If its using the same attribute you have to reset it to the value when you go to the next scene. Again. Please explain everything you have done and then we can likely point you in the right direction. I have not watched all of TSB videos and cannot go watch every video so that I can answer a question for others. Just explain everything you have setup.

    It sounds like…..

    Scene 1
    Timer Every 1 second
    Change Attribute Game.timer to game.timer-1

    Scene 2
    Timer Every 1 second
    Change Attribute Game.timer to game.timer-1

    If thats what you have done then when you change scenes you have to reset game.timer to the new timer value. nothing is counting down in the next scene there is just nothing to count down when you go to that scene.
Sign In or Register to comment.