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

#1 2010-03-29 22:39:50

Awsome-me
Scratcher
Registered: 2008-10-11
Posts: 59

Repeat until block that terminates immediatly

A repeat until <variable> block will stop when it meets <variable>, like it's supposed to. However, the only way to make it stop immediatly when the variable is met is to input a tedious amount of if blocks, which also slows the program down. I ask for this; add in a repeat until block that can terminate and move on as soon as the variable is met, and not at the end of the script. Thanks.


Check out my awsome stuff at http://scratch.mit.edu/users/Awsome-me
I've even got youtube: http://www.youtube.com/user/LegoPatapon

Offline

 

#2 2010-03-30 01:54:04

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: Repeat until block that terminates immediatly

Hmmm... I'm a bit confused. Can you please explain clearer?

I know you! You made Centipede!  yikes


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#3 2010-03-30 07:06:18

climber59
Scratcher
Registered: 2009-12-15
Posts: 100+

Re: Repeat until block that terminates immediatly

He wants the repeat until <> loop to stop as soon as the condition is met, even in the middle of the scripts.


Check out my projects if you have a chance.

Offline

 

#4 2010-03-30 10:30:16

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

Re: Repeat until block that terminates immediatly

Ah, you guys are getting into some tricky computer science problems now.  smile
I don't know the answer to this - I'm pretty sure it's not a simple problem no matter how much computer science knowledge and experience one has.


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

Offline

 

#5 2010-03-30 14:59:19

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Repeat until block that terminates immediatly

The only way I can think of doing this alternating between a block and an if block with the condition, i.e.
<when green flag clicked>
<repeat until> something
<change{ var }by( 1
<if><not> something >>
something else, etc.
<end>
<end>
[/blocks]

Last edited by nXIII (2010-03-30 14:59:53)


nXIII

Offline

 

#6 2010-03-31 17:59:31

Awsome-me
Scratcher
Registered: 2008-10-11
Posts: 59

Re: Repeat until block that terminates immediatly

I know how manually do it, I had the idea for a special repeat block for it.


Check out my awsome stuff at http://scratch.mit.edu/users/Awsome-me
I've even got youtube: http://www.youtube.com/user/LegoPatapon

Offline

 

Board footer