I'm having a bit of trouble with this code.
Object Selection
I want to be able to click on a sprite, and have the closest X number of similar sprites selected as well.
In my example CAPX, I have a grid which is divided by a wall. On the left is a textbox that will allow you to alter a number. Note that when you click on a sprite, the closest X other objects that the initial selection can "see" will be selected.
This is great if you want to do a grid based 'fog of war' type of game, but I literally just want to do it with selection. I have the wall in place because I want to select the objects within one 'room' before selecting objects in the next, rather than it just spreading out in an area around the initial selection.
As it stands, if the initial selection can't see the next room, none of the sprites in that room will be selected, no matter how high the X number selection is.
Does anyone know of a clever way to achieve this?
Going to be cheeky and tag in R0J0hound on this one, seeing as I was helped a lot the last time