Basically I'm trying to make something like guitar hero, and what I want to happen is when let's say the left key is pressed, the closest and only the closest left arrow dropping (I've noticed that there will be instances wherein more than one left arrow will be dropping) will have its y-coordinate checked for accuracy for scoring, and removed. The thing is, for the love of God, I can't figure out how to achieve this without unnecessarily overcomplicating anything. I have a gist of how to check for accuracy, but I don't know how to check for just the closest object. Perhaps getObjectsInRange but I don't really know how to use it. An explanation would be helpful, yes, thanks.
The only code I have so far is just for the falling of the arrows in designated x-coordinates, so I won't add any code on here. And please dumb down the explanation, I just started Greenfoot, I'm a high school student, and this is just for a project, ahaha thanks! :)


