Turtle, Observer, Patch

ask-list-of-turtles [list of turtle who numbers] [list of commands]

Parameters:
[list of turtle who numbers] List A list of turtle who numbers to ask
[list of commands] List of turtle commands A list of commands to ask these turtles to run

Description:
Turtles whose who numbers (ID numbers) are in [list of turtle who numbers] run [list of commands]. The caller of this command waits for it to finish before continuing. If some invalid whonumbers make up [list of turtle who numbers], they are ignored.

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

Examples:
ask-list-of-turtles [4 6 10 14] [fd 1] makes 4 turtles (those with who numbers 4, 6, 10, and 14) move forward one step.

Related Commands:
ask-breed ask-patch-at ask-patches ask-turtle ask-turtles ask-turtles-with