# How do I add a timer to my game, which you can change before the user starts the game

**URL:** <https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108>\
**Category:** Questions about Thunkable X\
**Created:** [October 16, 2022, 9:09am UTC](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108 "2022-10-16T09:09:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![leviocsmithk](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/leviocsmithk/32/136645_2.png) [@leviocsmithk](https://community.thunkable.com/u/leviocsmithk)\
**Post date:** [October 16, 2022, 9:09am UTC](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108/1 "2022-10-16T09:09:00Z")

</div>

In my app, I want the game/s to be able to go for a certain amount of time, also I want the amount of time to be changeable before the game starts and to have a small icon or text label, which counts down till the game is over.

Many Thanks, Levi

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 16, 2022, 4:55pm UTC](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108/2 "2022-10-16T16:55:51Z")

</div>

Start by Googling _countdown timer Thunkable_. There are several video tutorials in the results.

---

<div class="post-metadata">

**Author:** ![krish05](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/krish05/32/200523_2.png) [@krish05](https://community.thunkable.com/u/krish05)\
**Post date:** [October 16, 2022, 7:35pm UTC](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108/3 "2022-10-16T19:35:20Z")

</div>

Hi Levi,

Grab a timer component from design panel (left)

Set the timer, add a slider, a label to show your value, and set the slider as the time. Once GO is hit, your time selected will start.

---

<div class="post-metadata">

**Author:** ![leviocsmithk](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/leviocsmithk/32/136645_2.png) [@leviocsmithk](https://community.thunkable.com/u/leviocsmithk)\
**Post date:** [October 16, 2022, 9:03pm UTC](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108/4 "2022-10-16T21:03:44Z")

</div>

Ok, thanks I will Try That. 🙂

---

<div class="post-metadata">

**Author:** ![leviocsmithk](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/leviocsmithk/32/136645_2.png) [@leviocsmithk](https://community.thunkable.com/u/leviocsmithk)\
**Post date:** [October 17, 2022, 6:56am UTC](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108/5 "2022-10-17T06:56:34Z")

</div>

Basically, I would like this section of blocks to loop every minute, how would I make it so that every minute it runs and continues for like 30 minutes?

Here is what I had at the start.

 ![Screen Shot 2022-10-17 at 4.52.15 pm](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/0/20abe6f1041f91237de81d976a403921a11db442.png)  
 ![Screen Shot 2022-10-17 at 4.54.05 pm](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/b/7bc2fe181b2a8293b6f2c8c381b4598ef738c24d.png)

Here is what I have now, is this what you meant:

Many Thanks, Levi

---

<div class="post-metadata">

**Author:** ![leviocsmithk](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/leviocsmithk/32/136645_2.png) [@leviocsmithk](https://community.thunkable.com/u/leviocsmithk)\
**Post date:** [October 20, 2022, 9:07pm UTC](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108/6 "2022-10-20T21:07:01Z")

</div>

Because this way hopefully the timer will continue for a minute, then send off the location etc, and then go though again after a minute.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [October 21, 2022, 3:51pm UTC](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108/7 "2022-10-21T15:51:13Z")

</div>

You should never use `forever` and `Timer` together. Replace the `forever` block with a `Fire event of the timer` which will be a separate block not inside the `on Map Ready` block.

You need to set the timer to whatever interval you like.

In the `On Map Ready` block you should but the block `Timer Start`.

---

<div class="post-metadata">

**Author:** ![leviocsmithk](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/leviocsmithk/32/136645_2.png) [@leviocsmithk](https://community.thunkable.com/u/leviocsmithk)\
**Post date:** [October 22, 2022, 2:56am UTC](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108/8 "2022-10-22T02:56:59Z")

</div>

Ok, Thanks for your reply, I will try that.

---

<div class="post-metadata">

**Author:** ![leviocsmithk](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/leviocsmithk/32/136645_2.png) [@leviocsmithk](https://community.thunkable.com/u/leviocsmithk)\
**Post date:** [October 22, 2022, 5:33am UTC](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108/9 "2022-10-22T05:33:30Z")

</div>

I have everything except for the “Fire event of the timer” block, I genuinely can’t find it for the life of me, everything else I have though, so once I get that block I should work.

Sorry for any inconvenience, Many Thanks, Levi.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 22, 2022, 5:40am UTC](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108/10 "2022-10-22T05:40:56Z")

</div>

From the documentation:

> **[Timer](https://docs.thunkable.com/timer#blocks)**

---

<div class="post-metadata">

**Author:** ![leviocsmithk](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/leviocsmithk/32/136645_2.png) [@leviocsmithk](https://community.thunkable.com/u/leviocsmithk)\
**Post date:** [October 22, 2022, 5:48am UTC](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108/11 "2022-10-22T05:48:40Z")

</div>

![Screen Shot 2022-10-22 at 3.48.07 pm](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/a/9a7e6792e345a1618bb1eeb068999e6594fe7103.png)

Like this?

And then I just put my other location sensor blocks in after.

---

<div class="post-metadata">

**Author:** ![leviocsmithk](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/leviocsmithk/32/136645_2.png) [@leviocsmithk](https://community.thunkable.com/u/leviocsmithk)\
**Post date:** [October 22, 2022, 7:38am UTC](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108/12 "2022-10-22T07:38:13Z")

</div>

So it is correct?

Awesome, Thanks For your help let me just test it to make sure it works first.

---

<div class="post-metadata">

**Author:** ![leviocsmithk](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/leviocsmithk/32/136645_2.png) [@leviocsmithk](https://community.thunkable.com/u/leviocsmithk)\
**Post date:** [October 22, 2022, 7:39am UTC](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108/13 "2022-10-22T07:39:09Z")

</div>

Also, how should a incorporate a loop to this so that it repeats every min?

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [October 22, 2022, 1:07pm UTC](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108/14 "2022-10-22T13:07:56Z")

</div>

Whatever blocks you put in here will loop every time the timer fires (every 60000)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/9/d9f5056d509355a4cc3afcccff0478d4b5ee8aa6.png)

---

<div class="post-metadata">

**Author:** ![leviocsmithk](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/leviocsmithk/32/136645_2.png) [@leviocsmithk](https://community.thunkable.com/u/leviocsmithk)\
**Post date:** [October 22, 2022, 11:59pm UTC](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108/15 "2022-10-22T23:59:27Z")

</div>

Thanks, I will try this. Many MEGA THANKS, Levi. 😀

---

<div class="post-metadata">

**Author:** ![leviocsmithk](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/leviocsmithk/32/136645_2.png) [@leviocsmithk](https://community.thunkable.com/u/leviocsmithk)\
**Post date:** [October 23, 2022, 1:42am UTC](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108/16 "2022-10-23T01:42:25Z")

</div>

![Screen Shot 2022-10-23 at 11.42.04 am](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/f/afdf51cc2ea871c55b2643baf94e8cd8b97c6dc1.png)

Does this look correct?

---

<div class="post-metadata">

**Author:** ![leviocsmithk](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/leviocsmithk/32/136645_2.png) [@leviocsmithk](https://community.thunkable.com/u/leviocsmithk)\
**Post date:** [October 23, 2022, 1:49am UTC](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108/17 "2022-10-23T01:49:24Z")

</div>

Does it start automatically? Or do I have to add a button that tells it to start?

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 23, 2022, 1:58am UTC](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108/18 "2022-10-23T01:58:04Z")

</div>

The “call timer’s start” block should not be inside the “when timer fires” block. It should be inside a “when screen opens” block unless you want to start the timer using a button.

---

<div class="post-metadata">

**Author:** ![leviocsmithk](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/leviocsmithk/32/136645_2.png) [@leviocsmithk](https://community.thunkable.com/u/leviocsmithk)\
**Post date:** [October 23, 2022, 2:58am UTC](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108/19 "2022-10-23T02:58:00Z")

</div>

Ok, that makes more sense, I will try that, Many Thanks, Levi

---

<div class="post-metadata">

**Author:** ![leviocsmithk](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/leviocsmithk/32/136645_2.png) [@leviocsmithk](https://community.thunkable.com/u/leviocsmithk)\
**Post date:** [October 23, 2022, 3:10am UTC](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108/20 "2022-10-23T03:10:22Z")

</div>

![Screen Shot 2022-10-23 at 1.08.43 pm](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/c/9cc7d976d49ffc185d02f57f328049b44c13cd85.png)

Here is what I have got and it seems to work, does everything look correct to you?

Don’t close this topic yet, I just need to test it a lot more first.

[Next page](https://community.thunkable.com/t/how-do-i-add-a-timer-to-my-game-which-you-can-change-before-the-user-starts-the-game/2085108.md?page=2)
