# Trying to display timer variable but overwriting

**URL:** <https://forum.makecode.com/t/trying-to-display-timer-variable-but-overwriting/12026>\
**Category:** Arcade\
**Created:** [February 4, 2022, 7:56pm UTC](https://forum.makecode.com/t/trying-to-display-timer-variable-but-overwriting/12026 "2022-02-04T19:56:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![CrouchingPython](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/crouchingpython/32/1216_2.png) [@CrouchingPython](https://forum.makecode.com/u/CrouchingPython)\
**Post date:** [February 4, 2022, 7:56pm UTC](https://forum.makecode.com/t/trying-to-display-timer-variable-but-overwriting/12026/1 "2022-02-04T19:56:26Z")

</div>

So for some reason the countdown on my timer variable is displaying, but previous values are still on the screen. ???

> **[splashing a variable](https://arcade.makecode.com/98867-87651-36633-22786)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![hassan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/hassan/32/1457_2.png) [@hassan](https://forum.makecode.com/u/hassan)\
**Post date:** [February 4, 2022, 7:59pm UTC](https://forum.makecode.com/t/trying-to-display-timer-variable-but-overwriting/12026/2 "2022-02-04T19:59:58Z")

</div>

The `set textSprite to text sprite ""` block should only be used the first time that you are creating a text sprite. You want to use the `set textSprite text ""` block in your loop since that block will just change the value of the already existent text sprite.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/d/d35d29a9cc27951284084d9057d71d4f69a32ddd.png)

---

<div class="post-metadata">

**Author:** ![CrouchingPython](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/crouchingpython/32/1216_2.png) [@CrouchingPython](https://forum.makecode.com/u/CrouchingPython)\
**Post date:** [February 4, 2022, 11:07pm UTC](https://forum.makecode.com/t/trying-to-display-timer-variable-but-overwriting/12026/3 "2022-02-04T23:07:53Z")

</div>

Thanks so much! That totally makes sense. I knew I was missing something…

Followup question – is there a way to do this without the textsprite extension? I was trying to replicate the same functionality from Scratch, and this seems more complicated.

Again, thanks.

---

<div class="post-metadata">

**Author:** ![hassan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/hassan/32/1457_2.png) [@hassan](https://forum.makecode.com/u/hassan)\
**Post date:** [February 4, 2022, 11:15pm UTC](https://forum.makecode.com/t/trying-to-display-timer-variable-but-overwriting/12026/4 "2022-02-04T23:15:59Z")

</div>

You can achieve a similar effect without using extensions by using the `set mySprite to sprite of kind Player` block followed by a a `mySprite say ""` block. It is not nice, I’d recommend using the extension. @richard, @shakao, or @jwunderl might have a better idea.

Ex:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/c/c1c9d7ecbd6b8103e2ada77a1937296d389dd17d.png)

---

<div class="post-metadata">

**Author:** ![CrouchingPython](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/crouchingpython/32/1216_2.png) [@CrouchingPython](https://forum.makecode.com/u/CrouchingPython)\
**Post date:** [February 7, 2022, 5:35pm UTC](https://forum.makecode.com/t/trying-to-display-timer-variable-but-overwriting/12026/5 "2022-02-07T17:35:29Z")

</div>

Thanks again! I think it’s nice. Not having to use an extension is a plus in my book.

---

<div class="post-metadata">

**Author:** ![hassan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/hassan/32/1457_2.png) [@hassan](https://forum.makecode.com/u/hassan)\
**Post date:** [February 7, 2022, 9:31pm UTC](https://forum.makecode.com/t/trying-to-display-timer-variable-but-overwriting/12026/6 "2022-02-07T21:31:16Z")

</div>

No worries! Glad I could help 🙂. The first page of extensions are those approved by the MakeCode team, so you can add them to your projects without worry. Extensions published by individuals will still work, but you have to search them in the search bar. Regardless, I can understand the appeal of making a game with default tools available. The extensions are meant to support more advanced users who don’t want to spend time building the same functionality that already exists.
