Attracting to surface of a turtle [1 Attachment]

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Attracting to surface of a turtle [1 Attachment]

ramprasadh.kce
Hi,
 

 I have two forms of turtles. And they move randomly. This is what I want my program to do.
 

  If the small red turtles (snakes, as the breed name) comes closer to the larger green turtles (green), I need individual snakes to get attached to the surface of the canary. The snakes stops its random motion, while the canaries continues to move. I am not sure how to program the distance between the snakes and the canaries and to stop the movement. Can someone help me with this?  Code attached here.
 

 Thanks
 Ram.