Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Lists
- JayJayScott
-
10 posts
Lists
OK, so I'm making a game where you have a pet monster called Gizzy who you look after. So far everythings going great, as I can open shops and look around and close them and buy stuff. Only when something goes into a list I created called ‘fridge’ I can't find a way so I can click on the item in the list so I can use it is other scripts. Any Ideas???




- drmcw
-
1000+ posts
Lists
The only way I've seen of doing that is in this project http://scratch.mit.edu/projects/12575605/ see the nouse detect function. Basically it relies on the list being in the correct position and the size of each row being the same, so can work out the row from the mouse y position.
A more elegant way would be to go though the list and create a sprite or clone for each item then use the when sprite clicked block.
A more elegant way would be to go though the list and create a sprite or clone for each item then use the when sprite clicked block.
- JayJayScott
-
10 posts
Lists
Thanks
It's just that there are many foods to be put into the list Fridge that it would be hard to organize them all XD I'll give it a try, thats for your help 


- Discussion Forums
- » Help with Scripts
-
» Lists