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

#1 2008-09-05 19:39:37

Registered: 2008-01-24
Posts: 1000+

Lists For Noobs

I expect noobs won't know about these unless they come from another programming language using these or are really smart. And for everyone else who is still confused. I will explain a couple of games using lists (which just keep tons of data):

Draw to Life:

In this game, I had 2 lists. One that kept the X and Y position of the drawer, the other keeping track of when it was down and drawing. Now when you press a key, it goes through both lists using a variable called "checker". What that does is it repeats until the list is up going from 0 to whatever the length of the list is. So now I get the x positions. Now I use this same method to check whether the pen is down using a 0 if it's up and 1 if it's down.

Simon Says

Good idea for a game- needs lists. To use lists here, you would be keeping track of each previous color. You would need a variable to go through the list, but it would randomly generate a number from 1 to how ever many buttons you have. Now it would store the previous colors, and using broadcasts, would check if you were correct.

Mouse Recorder

Almost like my Draw to Life game. You would keep track of the Mouse's X and Y using a list. Than a variable will check each position of the list, which in turn would be where the sprite that copies your mouse goes.

I'm also listening to the TV if it doesn't sound very clear, that's the reason. But basically, lists store data.

Last edited by Bluestribute (2008-09-05 21:29:43)
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset



Board footer