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

#1 2012-03-14 18:54:15

aquafrog324
Scratcher
Registered: 2012-02-26
Posts: 19

list problem?

So I made this game to help me with my prepositions here: http://scratch.mit.edu/projects/aquafrog324/2394576 and i want it to be so that you don't have to type the prepositions in an exact order. please help  smile

Offline

 

#2 2012-03-14 21:24:56

aquafrog324
Scratcher
Registered: 2012-02-26
Posts: 19

Re: list problem?

bump

Offline

 

#3 2012-03-15 09:59:17

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: list problem?

OK, this could be a bit difficult.  hmm
I'd try, first check if it's in the list, using

<[prepositions v] contains (answer)>
If it is, so, try this:
set [index v] to [1]
repeat until <<(item (index) of [prepositions v]) = (answer)> or <(index) = ((length of [prepositions v]) + (1))>>
change [index v] by (1)

Last edited by scimonster (2012-03-15 09:59:31)

Offline

 

#4 2012-03-15 15:24:47

aquafrog324
Scratcher
Registered: 2012-02-26
Posts: 19

Re: list problem?

scimonster wrote:

OK, this could be a bit difficult.  hmm
I'd try, first check if it's in the list, using

<[prepositions v] contains (answer)>
If it is, so, try this:
set [index v] to [1]
repeat until <<(item (index) of [prepositions v]) = (answer)> or <(index) = ((length of [prepositions v]) + (1))>>
change [index v] by (1)

Thank you so much! I tried it and it works really well.  big_smile

Offline

 

#5 2012-03-15 15:51:38

aquafrog324
Scratcher
Registered: 2012-02-26
Posts: 19

Re: list problem?

uploaded it: http://scratch.mit.edu/projects/aquafrog324/2399194  smile

Offline

 

Board footer