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

#1 2013-01-30 07:42:51

nicclark
New Scratcher
Registered: 2013-01-30
Posts: 1

Pick random pairs

Hi,

I'm trying to make a script that chooses two random names and displays or says them, and keeps picking names until there are no more left.

Can I use a list and if so I can't work out how to not pick twice, the other method I though was to make a sprite for all the names but not got any further than that.

Any ideas appreciated!

Thanks

Offline

 

#2 2013-01-30 09:06:29

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: Pick random pairs

The best way to prevent picking the same name twice is to delete the names that have been picked from the list, like this:
http://i50.tinypic.com/b6t06p.gif


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

Board footer