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

#1 2012-03-12 11:58:13

sentinelwolves
New Scratcher
Registered: 2012-03-12
Posts: 5

60 second timers

how can i get a 60 second timer and make it do somthing... like change the background ( im a bit of a noob so i need somthing realy simple or an image of some kind)

Offline

 

#2 2012-03-12 12:02:05

joletole
Scratcher
Registered: 2011-02-20
Posts: 1000+

Re: 60 second timers

set [timer v] to [60]
That is all I have so far.

Offline

 

#3 2012-03-12 12:06:21

sentinelwolves
New Scratcher
Registered: 2012-03-12
Posts: 5

Re: 60 second timers

k

Offline

 

#4 2012-03-12 12:11:52

Splodgey
Scratcher
Registered: 2011-04-26
Posts: 500+

Re: 60 second timers

joletole wrote:

set [timer v] to [60]
That is all I have so far.

Do you need:

repeat until <(time) < [1]> //I put time instead of timer because of the timer block in sensing
wait (1) secs
change [timer v] by [-1]
end
do stuff
?

Offline

 

#5 2012-03-12 12:34:57

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

Re: 60 second timers

when gf clicked
reset timer
wait until < < (timer) = 60 > or < (timer)>60 > >
switch to background [Background v]
Gah I can never remember how to do an "or" in the forum blocks >:|

Last edited by RedRocker227 (2012-03-12 12:36:19)


Why

Offline

 

#6 2012-03-12 13:21:56

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: 60 second timers

RedRocker227 wrote:

when gf clicked
reset timer
wait until <(timer)=[60]>
switch to background [Background v]
Gah I can never remember how to do an "or" in the forum blocks >:|

You forgot the brackets in the =/>.
I think the script I put would work too.

Last edited by scimonster (2012-03-12 13:22:12)

Offline

 

#7 2012-03-12 15:26:09

turkey3
Scratcher
Registered: 2011-12-04
Posts: 500+

Re: 60 second timers

scimonster wrote:

RedRocker227 wrote:

when gf clicked
reset timer
wait until <(timer)=[60]>
switch to background [Background v]
Gah I can never remember how to do an "or" in the forum blocks >:|

You forgot the brackets in the =/>.
I think the script I put would work too.

Either work

Offline

 

#8 2012-03-12 17:15:58

trinary
Scratcher
Registered: 2012-01-29
Posts: 1000+

Re: 60 second timers

Take a look at my project, Count60, to see an example.


http://trinary.tk/images/signature_.php

Offline

 

#9 2012-03-12 20:46:19

MaxFlyboy
Scratcher
Registered: 2011-11-07
Posts: 100+

Re: 60 second timers

when gf clicked
reset timer
forever
if <<<timer> mod (60)> = (0)
next background
end
end
EDIT: What happened above? ^^^
when gf clicked
reset timer
forever
if <<<timer> mod (60)> = (0)>
next background
end
end

Last edited by MaxFlyboy (2012-03-12 20:47:27)


http://cdn.voodoofilm.org/images/upload/thumb/viral-video-2011.jpg click the picture for an AMV

Offline

 

#10 2012-03-13 05:24:42

Splodgey
Scratcher
Registered: 2011-04-26
Posts: 500+

Re: 60 second timers

MaxFlyboy wrote:

when gf clicked
reset timer
forever
if <<<timer> mod (60)> = (0)>
next background
end
end
EDIT: What happened above? ^^^
when gf clicked
reset timer
forever
if <<<timer> mod (60)> = (0)>
next background
end
end

You missed out the > at the end.

Offline

 

#11 2012-03-13 09:33:02

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: 60 second timers

Or

when gf clicked
wait (60) secs
do something

Last edited by Hardmath123 (2012-03-13 09:33:14)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#12 2012-03-13 11:27:36

johnrulz
Scratcher
Registered: 2011-04-15
Posts: 44

Re: 60 second timers

I suggest:

when gf clicked
reset timer
    if <<(timer) mod (60)> = (0)>
    broadcast [time up!]
and on backgrounds:

when I recieve [time up!]
next background

This way, other things canhappen at the same time  smile

Last edited by johnrulz (2012-03-13 11:32:16)

Offline

 

#13 2012-03-13 11:31:37

Splodgey
Scratcher
Registered: 2011-04-26
Posts: 500+

Re: 60 second timers

johnrulz wrote:

I suggest:

when gf clicked
reset timer
    if (((timer) mod [60]) = [0])
    broadcast [time up!]
and on backgrounds:

when I receive [time up! v]
next background

This way, other things canhappen at the same time  smile

Fixed. "I before E except after C"  tongue   lol

Offline

 

#14 2012-03-13 11:32:53

johnrulz
Scratcher
Registered: 2011-04-15
Posts: 44

Re: 60 second timers

lol i failed at blocks. Fixed now though

Offline

 

#15 2012-03-13 11:46:42

Lightnin
Scratch Team
Registered: 2008-11-03
Posts: 1000+

Re: 60 second timers

Wow, it's awesome to see people suggest lots of ways to solve this problem.  smile


Help Scratchers make the leap to 2.0!
http://img818.imageshack.us/img818/6844/transitionteam.jpg

Offline

 

#16 2012-03-13 11:54:03

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

Re: 60 second timers

scimonster wrote:

RedRocker227 wrote:

when gf clicked
reset timer
wait until <(timer)=[60]>
switch to background [Background v]
Gah I can never remember how to do an "or" in the forum blocks >:|

You forgot the brackets in the =/>.
I think the script I put would work too.

Actually, your method wouldn't work 100% of the time; the timer changes so fast that it would only equal 60 exactly for like, 0.001 seconds.

And by "or" I actually meant ">". I was just not concentrating, so I put the wrong word XD


Why

Offline

 

#17 2012-03-13 12:09:58

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: 60 second timers

RedRocker227 wrote:

scimonster wrote:

RedRocker227 wrote:

when gf clicked
reset timer
wait until <(timer)=[60]>
switch to background [Background v]
Gah I can never remember how to do an "or" in the forum blocks >:|

You forgot the brackets in the =/>.
I think the script I put would work too.

Actually, your method wouldn't work 100% of the time; the timer changes so fast that it would only equal 60 exactly for like, 0.001 seconds.

And by "or" I actually meant ">". I was just not concentrating, so I put the wrong word XD

Oh, lol.
And it would stay that way for 0.1 seconds, which is, unless there are hundreds of scripts running, enough time for the check.  wink

Offline

 

#18 2012-03-13 12:17:29

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

Re: 60 second timers

scimonster wrote:

RedRocker227 wrote:

scimonster wrote:


You forgot the brackets in the =/>.
I think the script I put would work too.

Actually, your method wouldn't work 100% of the time; the timer changes so fast that it would only equal 60 exactly for like, 0.001 seconds.

And by "or" I actually meant ">". I was just not concentrating, so I put the wrong word XD

Oh, lol.
And it would stay that way for 0.1 seconds, which is, unless there are hundreds of scripts running, enough time for the check.  wink

Ah okay.


Why

Offline

 

Board footer