This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-01-14 06:34:36

gazkilla
New Scratcher
Registered: 2012-01-14
Posts: 4

Timer to include 100ths of a second

Hi there, I'm creating a project which needs a timer in  seconds to include 10ths and 100ths of a second as well so it would look like this 04:49

I can get it with 2 digits ie. 4.4 but can't seem to work out how to get the last digit on?
Thanks for any replies
G.

Offline

 

#2 2012-01-14 06:48:37

gazkilla
New Scratcher
Registered: 2012-01-14
Posts: 4

Re: Timer to include 100ths of a second

sorry please ignore as sorted

Offline

 

#3 2012-01-14 07:05:21

gazkilla
New Scratcher
Registered: 2012-01-14
Posts: 4

Re: Timer to include 100ths of a second

sorry no sorted

Offline

 

#4 2012-01-14 07:12:36

gazkilla
New Scratcher
Registered: 2012-01-14
Posts: 4

Re: Timer to include 100ths of a second

sorry i thought i had the souloustion but i was wrong can anbody help??

Offline

 

#5 2012-01-14 08:30:18

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Timer to include 100ths of a second

You can't change how accurate the timer is, unfortunately.


Why

Offline

 

#6 2012-01-14 08:57:07

SJRCS_011
Scratcher
Registered: 2011-02-07
Posts: 1000+

Re: Timer to include 100ths of a second

You can use a variable as a timer, though.


http://i.imgur.com/vQqtH.png
Learning to Program in a Nutshell:  "You're missing a closing parentheses" - LS97

Offline

 

#7 2012-01-14 09:05:07

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Timer to include 100ths of a second

SJRCS_011 wrote:

You can use a variable as a timer, though.

That won't be accurate though.


Why

Offline

 

#8 2012-01-14 09:32:17

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: Timer to include 100ths of a second

RedRocker227 wrote:

SJRCS_011 wrote:

You can use a variable as a timer, though.

That won't be as accurate though.

It's still a timer, and if you hack to change the color, no one notices. And a way to speed it up so that it is accurate is to have it wait a little shorter of a time then is says it's waiting so that by the time the blocks activate, it will already have been the perfect time.

I hope that made sense.


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#9 2012-01-14 13:58:30

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Timer to include 100ths of a second

henley wrote:

RedRocker227 wrote:

SJRCS_011 wrote:

You can use a variable as a timer, though.

That won't be as accurate though.

It's still a timer, and if you hack to change the color, no one notices. And a way to speed it up so that it is accurate is to have it wait a little shorter of a time then is says it's waiting so that by the time the blocks activate, it will already have been the perfect time.

I hope that made sense.

Yes, that did make sense, but it still won't be anywhere near as accurate the timer, especially after it's been running for a while. If you want it to be accurate to two decimal places, you'd have to put:

When green flag clicked
Forever
  Wait (0.01) secs
  Change "Variable" by (0.01)
End forever

And the smaller the wait time is, the less accurate it gets.

Last edited by RedRocker227 (2012-01-14 13:59:07)


Why

Offline

 

#10 2012-01-14 14:46:20

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: Timer to include 100ths of a second

RedRocker227 wrote:

henley wrote:

RedRocker227 wrote:

That won't be as accurate though.

It's still a timer, and if you hack to change the color, no one notices. And a way to speed it up so that it is accurate is to have it wait a little shorter of a time then is says it's waiting so that by the time the blocks activate, it will already have been the perfect time.

I hope that made sense.

Yes, that did make sense, but it still won't be anywhere near as accurate the timer, especially after it's been running for a while. If you want it to be accurate to two decimal places, you'd have to put:

When green flag clicked
Forever
  Wait (0.01) secs
  Change "Variable" by (0.01)
End forever

And the smaller the wait time is, the less accurate it gets.

Touché.


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#11 2012-01-14 16:19:34

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Timer to include 100ths of a second

The timer automatically go to the thousand's place.  It simply only reveals up to the tenth's place if you click that check-box next to <(timer)>


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#12 2012-01-14 19:21:26

plb36
Scratcher
Registered: 2011-10-16
Posts: 100+

Re: Timer to include 100ths of a second

Using the join block, you can manually extend the number of decimal places displayed. Just set a variable to an adjoinment of however many letters you want of the timer. I tested this method and it worked for me. Hope this helps!  big_smile


http://i1094.photobucket.com/albums/i456/plb36/myforumssig.png

Offline

 

Board footer