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

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%.

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

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

could someone please help me out?

here is the remix of the thunkable page

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.

2 Likes

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?

1 Like

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

2 Likes

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.

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

1 Like

I beg your pardon?

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 :slight_smile:

1 Like

Oh, ok, I see now.

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?