out-<breed>-neighbor? out-link-neighbor?4.0

out-<breed>-neighbor? turtle out-link-neighbor? turtle Turtle Command

Reports true if there is a directed link going from the caller to turtle or if there is an undirected link connecting the caller with turtle. You can think of this as "can I get from the caller to turtle using a link?"

crt 2
ask turtle 0 [
  create-link-to turtle 1
  show in-link-neighbor? turtle 1  ;; prints false
  show out-link-neighbor? turtle 1 ;; prints true
]
ask turtle 1 [
  show in-link-neighbor? turtle 0  ;; prints true
  show out-link-neighbor? turtle 0 ;; prints false
]

Take me to the full NetLogo Dictionary