in-<breed>-from in-link-from4.0

in-<breed>-from turtle in-link-from turtle Turtle Command

Reports a directed link from turtle to the caller or an undirected link connecting the two. If no link exists then it reports nobody. If more than one such link exists, reports a random one. You can think of this as "give me a link that I can use to travel from turtle to the caller."

crt 2
ask turtle 0 [ create-link-to turtle 1 ]
ask turtle 1 [ show in-link-from turtle 0 ] ;; shows link 0 1
ask turtle 0 [ show in-link-from turtle 1 ] ;; shows nobody

See also: out-link-to link-with

Take me to the full NetLogo Dictionary