patch-ahead2.0

patch-ahead distance Turtle Command

Reports the single patch that is the given distance "ahead" of this turtle, that is, along the turtle's current heading. Reports nobody if the patch does not exist because it is outside the world.

ask patch-ahead 1 [ set pcolor green ]
;; turns the patch 1 in front of this turtle
;;   green; note that this might be the same patch
;;   the turtle is standing on

See also patch-at, patch-left-and-ahead, patch-right-and-ahead, patch-at-heading-and-distance.

Take me to the full NetLogo Dictionary