Discuss Scratch

Draco_Magnus
Scratcher
40 posts

How to make a timer with variables?

I am trying to make a timer for a soccer animation, and I can't figure out how to make it subtract time. Here's what I have so far:

whenclickedsetTimeto12:00whenIreceiveGameStartforeverchangeTimeby???wait1secs

I don't know what to put in the “???” I have tried to put -00:01, but it won't let me type a colon there. I have also tried -1 and that just changes it to -1. Can someone please help?

Last edited by Draco_Magnus (Oct. 6, 2020 20:08:05)

Th-ri
Scratcher
17 posts

How to make a timer with variables?

I really think there is a way but I don't know
This would be closest
whenclickedforeversetTimetotimer
Draco_Magnus
Scratcher
40 posts

How to make a timer with variables?

That might work, let me see…
Th-ri
Scratcher
17 posts

How to make a timer with variables?

Draco_Magnus wrote:

That might work, let me see…
Okay! Let me know if it works.
Draco_Magnus
Scratcher
40 posts

How to make a timer with variables?

Oh, that won't work. Timer is 1) counting up and 2) has too many numbers. Luckily, that gave me an idea. I could do:

whenIreceiveGameStartforeverchangeTimeby___


In the blank, I could use some operator blocks, but do you know how I could do that?
p-p-p-p-p-p-p-p-p-p-
Scratcher
1000+ posts

How to make a timer with variables?

Hello there! Colons aren't supported. You can create something to make hours and something to make minutes like this:

setsecondsto60foreverchangesecondsby-1ifseconds=0thenwait1secsbroadcast-1 minsetscoreto60elsewait1secs

setminutesto12whenIreceive-1 minchangeminutesby-1foreversettimetojoinjoinminutes:seconds
Th-ri
Scratcher
17 posts

How to make a timer with variables?

No but some operators blocks work
Draco_Magnus
Scratcher
40 posts

How to make a timer with variables?

Ah, very smart. Thank you so much, p-p-p-p-p-p-p-p-p-p-p(etc).

Last edited by Draco_Magnus (Oct. 6, 2020 20:30:32)

Draco_Magnus
Scratcher
40 posts

How to make a timer with variables?

I am using this for a soccer game(I guess it could be called a soccer show) and seeing this work makes me want to make an actual scoreboard like you see on TV in other sports.

Powered by DjangoBB