I'm having a really strange problem with this which I can't resolve.
I have 3 layers, each with a tile on it, which I want to be clickable with the mouse. They're all in the same place but I only want the one on the currently visible layer to be clickable. The tiles are in a family but I don't think that matters here.
So the solution would seem to be....
Mouse - On left button clicked on 'tiles'
System - tiles.Layername is visible
I would have thought this would filter so that only the tile which is on the visibile layer would be picked. But it doesn't work when there are 3 tiles ontop of each other, and only one layer is visible (it picks none). If I move one of the tiles so that it's not in the same location at the others on the invisible layers, it does pick that one tile when visible and clicked).
Just to add to that, if I remove the second condition (check if the layer is visible), it does then correctly pick all 3 tiles. So the first condition is working correctly, it does pick the 3 tiles that have been clicked, but something's wrong with the way it filters the next condition.