grab number [list of commands]
Caller instructs turtles with who number(s) number(s) to execute [list of commands] . The who number of the turtles being grab bed are stored in partner , if there is one, or partners , if there are many. A turtle cannot grab itself.
Examples:
grab one-of-turtles-here [setc red setc-of partner blue]
This turns the caller red and the grab bed turtle blue. If there are no other turtles on the caller's patch, the [list of commands] does not get executed and no turtles change color.
Related functions:
partner partners
|