blackhornet - I think I'm following the logic in your capx...
1. Bee object instance is clicked
2. For EACH Bee in the Family, set the NextUID family instance variable to -1
3. Call the Connect function with a parameter that plugs in the UID of the Bee that was clicked.
4. On call of the Connect function...
5. Pick the object that has a UID that equals 0 and set the NextUID value to UID of the object instance that was picked.
6. Pick all instances of the Family whose NextUID value is equal to -1.
7. From those selections, pick a random instance of the Family and set the UID of the Family to the Next instance variable of the Bee that was picked.
8. Draw the line between the two objects.
9. Call on the Function again and run it for all other instances of the Family whose UIDs are 0.
How'd I do? I'm still not sure I fully understand the whole thing.