When an image sprite enters a designated trash can, the correct score should increase, but only the incorrect score increases. Is this the correct way to designate an image sprite to a trash can? Also, when an image sprite collides with a trash can, the image sprite should disappear and a new image sprite should be created in the designated spot, but the image is just replaced and remains the same. How should I code this? Please help me.
I am a Korean high school student and this is a very urgent problem. Thank you.
Your collision event is not using the other variable and the picture of the sprite for that collision event in deciding the score.
Comparing two entire lists makes no sense
thank you sooo much! Then what should I do, sir? i cant see other blocks that might works..
You need to do a table lookup in a two column table using the lookup in pairs list block.
Column one has trash picture file names and column two has matching container picture file names.
When a trash sprite hits a container sprite, lookup the trash's requirement picture and compare that to the actual other sprite's picture.
If they match, good, other bad.
You could keep container component blocks in column two to reduce the comparison to Other= lookup result.
Search this board for How to work with lists
thank you:)
I created two lists, and whether it's true or false, the true score always comes out as 0 and the false score always comes out as false. please help me im so sadㅠㅠ
(Canned Reply: ABG - Download those blocks and post them here)
Please download and post each of those event block(s)/procedures here ...
P.S. These blocks can be dragged directly into your Blocks Editor workspace.
See
for how to download individual draggable block images.
And so deaf. Why didn't you follow my advice from your other thread?
Where is your two column table?
(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
It was easier for me to code my own version of the game, without graphics, to show the underlying list logic and table structure.
I hope you can read English.
recycling.csv (158 Bytes)

trash_recycler_points.aia (3.7 KB)
I brought in my trash and category table from a Media CSV Table file:
pizza box,cardboard
banana peel,compost
tin can,recycle
glass beer bottle,recycle
paint can,trash
leftovers,compost
dog poo,compost
newspaper,cardboard
Column 1 has trash, column 2 has that trash's category.
I load that file into two dictionaries:
- a dictionary where I can lookup the category for each trash item
- a dictionary just for keeping unique category names in its keys. Dictionary keys are unique.
After the two dictionaries have been loaded from the file, I load the ListView Elements from the unique categories collection, and show a randomly selected trash key from the trash-categories dictionary.
When the ListView Selection event fires, I compare the corresponding category from the displayed trash item's category lookup to the selected category from the ListView.
If they match, I give a point, otherwise I deduct 4 points.
Note that the CSV files contains all the knowledge about what is trash and what categories they belong to.
This back end logic is adaptable to whatever front end graphics you want to use and whatever language you speak.