Hi,
I was just wondering, while making a project, you could sort sprites into files on the bottom of the screen (where all the sprites are). For some people (like me) that make simlations where you move into different rooms and pressing buttons and things. Let me tell you an example..
I'm making a supermarket simulation, you can move around different aisles (I can't spell it ) and buy things. I need a buy button next to the lists of items you can buy, but I have to make one buy button sprite for every item (because I'm a dummy ). I would like this because let's say, I don't know, there are 10 buy buttons in every aisle, and there are 10 aisles. Having 100 buttons and trying to sort them into their proper aisles might be a bit difficult (I was kidding - very difficult), so yeah...being able to sort the buy buttons into 'Aisle 1', 'Aisle 2', etc etc would be alot easier.
I wrote alot so you better make it!
lol I'm kidding...
cheers,
sonicpops
Offline
If I'm understanding you right you are requesting something like Arrays/Lists/Collections in other programming languages, i.e. a data construct that is able to hold a batch of others (variables/sprites etc). I absolutely agree with you that this is something Scratch is painfully lacking as of now. Trying to manage hundreds of sprites/variables in a Scratch project is definitely no fun (although there are some pretty impressive attempts...).
But to get back to your shopping example:
Maybe you could use the product sprites as buttons for themselves: How about adding a local variable to each product-sprite indicating its amount of purchase (how many times it was bought). Then you could make it so that if you click on a product it increments that amount by one (and if you press down arrow while it is touching the mouse pointer it decreases the amount by one, with zero as default and floor). You could also make the product sprite display the amount by using the "say" command every time it is clicked/touched.
Then you could make another sprite (the "cash register") which queries each product-sprites amount of purchase using the "(amount) of (product)" reporter block to come up with a total sum (and possibly a list of items bought).
Offline