Remembering coordinates in a list

On Jan 16, 2026, at 3:21 PM, XXXX via Snap! Contact List <contact@snap.berkeley.edu> wrote:

Dear Snap! developers,

I hope you are doing well. I am a student in AP Computer Science Principles, and I am wondering if you guys can add a feature that shows the coordinates of each point in the stage if you right click on it. It will make coding for go to: [x] [y] so much easier.

Thank you very much.

You can program this yourself in Snap! if you create a variable named MOUSE POSITION and then make this script:


Then whenever you click the mouse you’ll see its coordinates.


But there’s really no need for you to eyeball positions yourself; you can remember them in a list. For example, here’s a script that draws a pentagram:

   
It starts by drawing the outer edge, a regular pentagon. At each vertex, it adds the current sprite position to a coordinate list (a list of five items, each of which is a list of two numbers). After drawing the pentagon, it duplicates the coordinates, to make a list of length 10. Then it sends the sprite to each even-numbered list item, and that draws the inner star.

Never mind the specific details of this script; I just tried to make the simplest thing that would get the point across. I could have done arithmetic on the item numbers to wrap around the list of five positions instead of using the hack of duplicating the coordinates, but this is a simpler program. The main things to remember are the untitled script pic (13) reporter, the untitled script pic (11) command, and the fact that you can drop an ITEM (or any) reporter on the menu slot of the untitled script pic (12) command.

Hope that helps!

Oh, interesting that they emailed you rather than making a forum post