Observer

ask-patches [list of commands]

Parameters:
[list of commands] List of patch commands A list of commands for the patches to run

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

Asking the patches to do something is a moderately expensive operation since StarLogo creates a thread for each patch. Try to group commands that you would have put into separate ask-patches into the same one to minimize thread creation overhead.

Examples:
ask-patches [setpc red] colors all of the patches red.

Related Commands:
ask-breed ask-list-of-turtles ask-patch-at ask-turtle ask-turtles ask-turtles-with setbg