# Please help... Creating a health progress bar that depletes over time

**URL:** <https://community.thunkable.com/t/please-help-creating-a-health-progress-bar-that-depletes-over-time/565223>\
**Category:** Questions about Thunkable X\
**Created:** [May 10, 2020, 10:16am UTC](https://community.thunkable.com/t/please-help-creating-a-health-progress-bar-that-depletes-over-time/565223 "2020-05-10T10:16:24Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![anusdesignstudent](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/anusdesignstudent/32/68752_2.png) [@anusdesignstudent](https://community.thunkable.com/u/anusdesignstudent)\
**Post date:** [May 10, 2020, 10:16am UTC](https://community.thunkable.com/t/please-help-creating-a-health-progress-bar-that-depletes-over-time/565223/1 "2020-05-10T10:16:24Z")

</div>

hello, I am currently working on a virtual pet app which shows the health bar of the pet

when virtual pets are left over time, usually this progress health bar will deplete, which then requires an action to restore it to 100%.

 ![Screenshot 2020-05-10 at 6.15.31 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/5/457331828e4972b0cb13cbb0c0fcff57674d1d9b.png) ![Screenshot 2020-05-10 at 6.15.53 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/2/1280f068a2bc7e143efeb4ee8d5ff6f7dadf3860.png)

I have tried modifying a progress bar that allows button clicks to replenish the ‘health’

 ![Screenshot 2020-05-10 at 6.01.18 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/d/ed50bebf7a4b6020e9b8fed9bfbbddb7a4ce011e.png)

but so far I haven’t figured out how to make this percentage/values decrease over time

could someone please help me out?

[here](https://x.thunkable.com/copy/2bf7b7a58a60f72c7ff65bcb0b26d9b4) is the remix of the thunkable page

---

<div class="post-metadata">

**Author:** ![eoinparkinson](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eoinparkinson/32/143769_2.png) [@eoinparkinson](https://community.thunkable.com/u/eoinparkinson)\
**Post date:** [May 10, 2020, 11:13am UTC](https://community.thunkable.com/t/please-help-creating-a-health-progress-bar-that-depletes-over-time/565223/2 "2020-05-10T11:13:28Z")

</div>

Hi @anusdesignstudent, welcome to the Community.

You could use the **Seconds since 1970** block (located in the device block section). You can then calculate the difference.

I don’t know how long your pet health is, I’m guessing a day?

If so there are 86400 in a day, so your health bar would calculate the difference from the last stored time stamp and the current one, in seconds since 1970.

---

<div class="post-metadata">

**Author:** ![anusdesignstudent](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/anusdesignstudent/32/68752_2.png) [@anusdesignstudent](https://community.thunkable.com/u/anusdesignstudent)\
**Post date:** [May 10, 2020, 11:20am UTC](https://community.thunkable.com/t/please-help-creating-a-health-progress-bar-that-depletes-over-time/565223/3 "2020-05-10T11:20:41Z")

</div>

Hello @eoinparkinson, thank you for the welcome and the reply!!!

Unfortunately I don’t quite understand how to put the blocks together… do you think you could help me out a little?

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [May 10, 2020, 11:30am UTC](https://community.thunkable.com/t/please-help-creating-a-health-progress-bar-that-depletes-over-time/565223/4 "2020-05-10T11:30:28Z")

</div>

this is off topic. but how is the anus design, going anyway? come up with anything new?

---

<div class="post-metadata">

**Author:** ![anusdesignstudent](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/anusdesignstudent/32/68752_2.png) [@anusdesignstudent](https://community.thunkable.com/u/anusdesignstudent)\
**Post date:** [May 10, 2020, 11:35am UTC](https://community.thunkable.com/t/please-help-creating-a-health-progress-bar-that-depletes-over-time/565223/5 "2020-05-10T11:35:58Z")

</div>

Ay Jared, cool app that’s on the front page! About that username… I’m an industrial design student from NUS. My group project is about creating a virtual pet, so we settled on turning one coronavirus cell into a virtual pet that can be fed DNA strands, stroked with q-tip while it dispenses local updates (extracted from API) on daily infected count, etc.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [May 10, 2020, 12:46pm UTC](https://community.thunkable.com/t/please-help-creating-a-health-progress-bar-that-depletes-over-time/565223/6 "2020-05-10T12:46:36Z")

</div>

Sounds like a fun app. Reminds me of a tomagochi(so?)

---

<div class="post-metadata">

**Author:** ![Dean\_Artis](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@Dean\_Artis](https://community.thunkable.com/u/Dean_Artis)\
**Post date:** [May 10, 2020, 3:12pm UTC](https://community.thunkable.com/t/please-help-creating-a-health-progress-bar-that-depletes-over-time/565223/7 "2020-05-10T15:12:45Z")

</div>

> [@jared](#):
>
> how is the **anus** design, going anyway?

I beg your pardon?

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [May 10, 2020, 3:33pm UTC](https://community.thunkable.com/t/please-help-creating-a-health-progress-bar-that-depletes-over-time/565223/8 "2020-05-10T15:33:53Z")

</div>

The users name is anusdesignstudent

Put all together without much thought it looked like anus design student

But really

The user is a NUS Design Student

National university of Singapore?

Also, sorry for going off topic. I’ll stop now 🙂

---

<div class="post-metadata">

**Author:** ![Dean\_Artis](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@Dean\_Artis](https://community.thunkable.com/u/Dean_Artis)\
**Post date:** [May 10, 2020, 3:51pm UTC](https://community.thunkable.com/t/please-help-creating-a-health-progress-bar-that-depletes-over-time/565223/9 "2020-05-10T15:51:14Z")

</div>

Oh, ok, I see now.

---

<div class="post-metadata">

**Author:** ![skylarji200458](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@skylarji200458](https://community.thunkable.com/u/skylarji200458)\
**Post date:** [July 14, 2020, 2:28pm UTC](https://community.thunkable.com/t/please-help-creating-a-health-progress-bar-that-depletes-over-time/565223/10 "2020-07-14T14:28:56Z")

</div>

Hi, I’m trying to create an app that does a similar purpose, but I’m not sure how to implement the seconds since 1970 into blocks, could someone help me with this?

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:29am UTC](https://community.thunkable.com/t/please-help-creating-a-health-progress-bar-that-depletes-over-time/565223/11 "2024-11-08T11:29:16Z")

</div>


