Discuss Scratch

iluvegames
Scratcher
76 posts

How to make a timer

My question is in the subject, how do you make a timer for a project? (give the player a set amount of time to complete an action/the project)
colinmacc
Scratcher
1000+ posts

How to make a timer

This will give you 60 seconds before the “Out of Time” broadcast is sent.
To see how many seconds are left, display the “Time Left” variable.

whenclickedsetMax Timeto60resettimerrepeatuntiltimer>MaxTimesetTime LefttoroundMaxTime-timerwait1secsbroadcastOut of Time

Last edited by colinmacc (Feb. 27, 2019 15:41:46)

iluvegames
Scratcher
76 posts

How to make a timer

OK, thanks, will try this.
cs1493255
Scratcher
25 posts

How to make a timer

it
working
iluvegames
Scratcher
76 posts

How to make a timer

Ok, the timer works. Now how am I supposed to freeze the timer if the task is completed before the timer ends?
Anonymous1212144
Scratcher
100+ posts

How to make a timer

Save it into a variable.
user_Matteo
Scratcher
43 posts

How to make a timer

make a variable that gets set to 1 once the task is completed and then use this script (@colinmacc 's script)
whenclickedsetMax Timeto60resettimerrepeatuntiltimer>MaxTimeorTask Complete (variable)=1setTime LefttoroundMaxTimer-timerwait1secsifTask Complete (variable)=1thenbroadcastFinished in TimeelsebroadcastOut of Time
in theory this should work
success with your project!
TornadoAlleyU
Scratcher
9 posts

How to make a timer

whenclickedset timertorepeatchange timerby-1Hopethathelped

Last edited by TornadoAlleyU (Nov. 8, 2021 16:54:00)

dave-alt-4
Scratcher
1000+ posts

How to make a timer

dont necropost pls








this post is 1.5 year old
rc93396
Scratcher
4 posts

How to make a timer

timer

Powered by DjangoBB