[Solved] Timers not working

I don’t think there’s a need for the “At the beginning of the scene” event

@piyushpalawat99 it doesn’t works also after removing “At the beginning of the scene” event.

@HarshRajSinghania Is there a reason you are using an object timer rather than a scene timer?

@piyushpalawat99 thanks for your suggestion to use scene timers.

Is the problem fixed?

@piyushpalawat99 I am not sure I will check when I am on my pc

1 Like

Nothing is correct here

Each block is executed each frame, you do :

  • reset a timer already at 0
  • init a var to 60 , and change text to ‘Time Left:60’
    when time is more than 1sc you reset your timer but he is always to 0
    and you do -1 to your var.

next frame you do same.
Then your variable is always =60
and timer have not time to up, he is always reset so always 0

You need init your variable just once time, not every frame, and you don’t need to reset when you start scene.

(Timer inside object is a good use of case here)

1 Like

Won’t replacing the first action with Do = 60 to scene variable TimeLeft be enough?

Thanks @Bouh I found what is wrong. The problem is now solved.

@HarshRajSinghania Please post your solution here to help future users :wink:

Solution:-


Works Perfectly

Is the reset timer action at the beginning of the scene really needed?

@piyushpalawat99 not needed

1 Like