Observer

ask-patches-with [condition] [list-of-commands]

Parameters:
[condition] List of patch commands list of commands that evaluates to either true or false
[list-of-commands] Number list of commands to run

Description:
This observer command asks all of the patches that satisfy [condition] to run the [list-of-commands]. The observer will wait for the patches to finish before moving on.

Examples:
ask-patches-with [pc = red] [setpc blue] colors all of the red patches blue

Related Commands:
ask-patch-at