Im doing Create 1 for my AP class and i cant figure out how to incorperate a list into my code. I would really like some help as ims stumped

You may need to zoom in to see it.
The game is where you tap the criminals and you get different amount of points but if you hit the civilian you lose points.

Welcome, please read

Sorry. About the formatting issue im juat really stumped and my teacher said to just go on here and ask. Do you think you could helo me find out how to put a list in the game?

Welcome Julian.

  1. your Block image is unreadable. To get a clean image go to Blocks screen;
    right mouse click on the white space in the screen and
    to get a png of all your Blocks you can post and everyone can read.

A list of what Esmantly? Your instructor would like you to use a List. Someone here could help if we had a clear image of your Blocks and a better description of what the List would contain and why it would be needed.

I suppose you have different pictures for criminals and civilians, right, and the things you will be tapping will be Sprites with .Pictures holding file names from the Media folder, right?

So if you make a lookup table or dictionary with the File name in column 1 and the increase or decrease (+ or -) for that picture in column 2, all you need to do in your Sprite.Touched event is to lookup the touched Sprite's picture in that table, and add the lookup value (+ or - number) to your score.

Sample table:


Use the global init block along with nested Make A List blocks to make your table in the Blocks Editor.

The list block Lookup In Pairs is good for this.