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

#1 2010-11-29 04:08:17

Shadowed1
Scratcher
Registered: 2010-01-19
Posts: 100+

Finishing 'repeat until' blocks immediately

Repeat until blocks ignore the stop script until it gets to the end of what it's doing. So if you were doing 'wait 2 seconds, change to costume1, wait 2 seconds, change to costume 2', it would keep doing that until it ended AND the stop script was true. I think the 'repeat until' blocks should stop what the inside script is as soon as the stop script is true.


*Insert some witty, funny or sarcastic comment here*

Offline

 

#2 2010-11-29 16:49:04

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Finishing 'repeat until' blocks immediately

I've tested this, and the 'stop all' block stops a 'repeat until' script in the middle.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#3 2010-11-30 03:45:59

Shadowed1
Scratcher
Registered: 2010-01-19
Posts: 100+

Re: Finishing 'repeat until' blocks immediately

Harakou wrote:

I've tested this, and the 'stop all' block stops a 'repeat until' script in the middle.

What if you wanted for the script to continue on? Say if there was some scripting afterwords that you wanted it to complete?
And, if you wanted it to stop immediately, and it was in the middle of a 2-second-glide or something, it might mess up the stuff afterwords.
I have to use 'stop script' blocks, which is rather annoying, as the script doesn't do what is afterwords (because it has stopped).
And also, wouldn't it be 'stop script' blocks? Stop all would stop everything...


*Insert some witty, funny or sarcastic comment here*

Offline

 

#4 2010-12-03 21:56:17

Shadowed1
Scratcher
Registered: 2010-01-19
Posts: 100+

Re: Finishing 'repeat until' blocks immediately

The current method for stopping it isn't very good, as it has to do 1 more 'repeat'' before it stops.


*Insert some witty, funny or sarcastic comment here*

Offline

 

#5 2010-12-04 00:26:11

mathematics
Scratcher
Registered: 2009-03-01
Posts: 1000+

Re: Finishing 'repeat until' blocks immediately

I don't find any problem with the current method... I prefer the current one, actually.

Offline

 

#6 2010-12-04 10:56:11

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Finishing 'repeat until' blocks immediately

Shadowed1 wrote:

Harakou wrote:

I've tested this, and the 'stop all' block stops a 'repeat until' script in the middle.

What if you wanted for the script to continue on? Say if there was some scripting afterwords that you wanted it to complete?
And, if you wanted it to stop immediately, and it was in the middle of a 2-second-glide or something, it might mess up the stuff afterwords.
I have to use 'stop script' blocks, which is rather annoying, as the script doesn't do what is afterwords (because it has stopped).
And also, wouldn't it be 'stop script' blocks? Stop all would stop everything...

Well, the glide block is a completely different story. The glide block is always like that, because it's one action. That has nothing to do with the repeat block. And you seem to be lobbying for a block that would cause the script that immediately exits the loop and moves on to the rest of the script. That would be a good idea.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#7 2010-12-04 16:27:35

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: Finishing 'repeat until' blocks immediately

Not a bad idea! Perhaps the "stop script" should wait until the loop is completely finished, and "stop loop" will stop it right in the middle.  smile


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

Offline

 

Board footer