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

#1 2010-05-28 19:01:01

GamingGuyXD
Scratcher
Registered: 2009-05-23
Posts: 6

New "For" block.

Well, I have been working on a Scratch project, and I've stumbled across a problem. I have a bunch of items in a list, and I want to display those items by making a sprite say something. BUT! I would like the sprite to say each item in that list separately. I tried and failed, until I thought about how most programming languages have a "for" statement. I think you should add it for the more complex projects that are out there, to make it easier. Just a thought.

Offline

 

#2 2010-05-28 19:02:57

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: New "For" block.

Hey, GamingGuy! I suspect you mean something like "Repeat until" - that block is already available! "Repeat until" is simplified language for "for" because a lot of the people on this site might find that confusing  smile

Offline

 

#3 2010-05-29 13:33:10

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

Re: New "For" block.

I have a picture to show you how to do what you mean. It is possible with given blocks.

http://i47.tinypic.com/69i32d.gif


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

Offline

 

#4 2010-05-31 17:35:03

Jwosty
Scratcher
Registered: 2009-12-19
Posts: 500+

Re: New "For" block.

henley wrote:

I have a picture to show you how to do what you mean. It is possible with given blocks.

http://i47.tinypic.com/69i32d.gif

Actually, it could be:
repeat until index = legnth of items + 1 ...


http://i39.tinypic.com/18ert5.png Google it.  smile

Offline

 

#5 2010-05-31 17:48:28

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: New "For" block.

no just set index to 0 and move the change index by 1 before the say


You can now reach me on Twitter @johnnydean1_

Offline

 

Board footer