BehaviourComposer: ignore everything before this.
Begin description: Move horizontally or vertically towards another agent. End description
Move towards another
Begin NetLogo code:
substitute-text-area-for expression-for-other the-other substitute-text-area-for speed 1 move-horizontally-or-vertically-towards-another expression-for-other ; other agent or patch speed ; maximum distance moved
End NetLogo code
You can replace the first text area with any expression that reports a patch or an agent such as
This uses move-horizontally-or-vertically-towards-another to move speed units towards the patch of the agent referenced in the first box. The odds of whether it moves horizontally or vertically is proportional to the horizontal and vertical distance to the other.
There are many movement behaviours in the main library.
Move towards another was implemented by Ken Kahn.
BehaviourComposer: ignore everything after this.