MicroWorlds Last message

Touchedturtle can only be used in the OnTouching field in a turtle's backpack

A turtle can find out the name of the turtle that it is touching by using touchedturtle in an instruction in its OnTouching field in the Rules Tab of its backpack. The information touchedturtle reports makes it possible for the turtle to react differently when touching different turtles.

Examples of valid OnTouching instructions:

ask touchedturtle [note 65 5]
if touchedturtle = "t1 [glide 200 2]
remove touchedturtle
ask touchedturtle [ht]