Hi. I'm at a loss with this.
Suppose I want the player to click a Sprite1. When they do, a line is drawn from this clicked Spirte1 to another instance of Sprite1 (provided there is one), and if there are any more instances then the line is further drawn to them.
The drawing of the line itself is not the problem, the problem is determining where to draw it.
What i need is something like "pick another instance" or "pick random instance excluding the currently picked one", so the logic would go like this:
Sprite1 clicked --> save coordinates of Sprite1 into a variable --> pick another instance of Sprite1 --> draw a line between the variable coordinates and the Sprite1 --> repeat for as long as tere any more instances.
The order doesn't matter, as long as the first instance is the clicked one.
So I would like to end up with something like in the picture:
<img src="http://i39.tinypic.com/mr3a89.png" border="0" />
Any ideas appreciated.