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

#26 2012-08-09 12:19:21

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: Scratch 2.0

blargin wrote:

OK done with <brodcast recieved> now i have another idea:

repeat for () secs

You could use the timer.

reset timer
repeat until <(timer) > ((time you want) - (0.01))>
 scripts
end


http://i50.tinypic.com/312u714.jpg

Offline

 

#27 2012-08-09 15:57:02

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Scratch 2.0

BirdByte wrote:

blargin wrote:

OK done with <brodcast recieved> now i have another idea:

repeat for () secs

You could use the timer.

reset timer
repeat until <(timer) > ((time you want) - (0.01))>
 scripts
end

There's a problem with that idea though, say the script in the repeat takes longer than the time, would it stop or go until the end of the loop, the timer one does the latter


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#28 2012-08-09 16:18:38

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: Scratch 2.0

zammer990 wrote:

BirdByte wrote:

blargin wrote:

OK done with <brodcast recieved> now i have another idea:

repeat for () secs

You could use the timer.

reset timer
repeat until <(timer) > ((time you want) - (0.01))>
 scripts
end

There's a problem with that idea though, say the script in the repeat takes longer than the time, would it stop or go until the end of the loop, the timer one does the latter

For example,

repeat for (4) secs
     wait (5) secs
end
AFTER-PREVIEW EDIT: Aww, no custom C blocks! D:


http://i50.tinypic.com/312u714.jpg

Offline

 

#29 2012-08-10 08:27:15

blargin
Scratcher
Registered: 2012-07-06
Posts: 49

Re: Scratch 2.0

BirdByte wrote:

zammer990 wrote:

BirdByte wrote:


You could use the timer.

reset timer
repeat until <(timer) > ((time you want) - (0.01))>
 scripts
end

There's a problem with that idea though, say the script in the repeat takes longer than the time, would it stop or go until the end of the loop, the timer one does the latter

For example,

repeat for (4) secs
     wait (5) secs
end
AFTER-PREVIEW EDIT: Aww, no custom C blocks! D:

well if you say repeat for 4 secs then you wouldn't want to put wait 5 secs in it anyway because you want it for 4 secs so if you do that the block will just turn red.

Offline

 

#30 2012-08-10 16:51:46

Agg725
Scratcher
Registered: 2012-03-13
Posts: 500+

Re: Scratch 2.0

chrisbown wrote:

Sorry but this will make scratch much more complicated, scratch is meant to be simple.

Panther is simple, my brother has it and he lets me use it. I suppose I'm neutral on this topic, though.


http://i.imgur.com/LIoxG.png

Offline

 

#31 2012-08-23 12:03:51

blargin
Scratcher
Registered: 2012-07-06
Posts: 49

Re: Scratch 2.0

BirdByte wrote:

blargin wrote:

OK done with <brodcast recieved> now i have another idea:

repeat for () secs

You could use the timer.

reset timer
repeat until <(timer) > ((time you want) - (0.01))>
 scripts
end

not if you need it for something else

Offline

 

Board footer