StarLogo Vocabulary:

Observer Commands



= used for the observer,
= used for turtles,
= used for patches


_____________________________________________________________
clearall, ca

Kills all turtles, sets the color of all patches to black, and clears the Plot Window.
_____________________________________________________________
cc

(clear commands)

Deletes all text in the command center.
_____________________________________________________________
cleargraphics, cg

(clear graphics)

Sets the color of all patches to black.
_____________________________________________________________
create-turtles, crt
number

Creates number new turtles. New turtles start at position (0, 0). [Explain initial color and headings.]
_____________________________________________________________
create-frogs
number

Creates number new frogs.
_____________________________________________________________
diffuse
variable number

Tells each patch to share a portion (number) of the value of variable with its eight
neighboring patches. number should be between 0 and 1.

Example:
diffuse chemical 0.5
(Each patch diffuses 0.5 of its variable chemical to its neighboring 8 patches.)
_____________________________________________________________
hidden?-of

Returns true if turtle is hidden.
_____________________________________________________________
nsum
variable1 variable2
(neighbor sum)
nsum4 variable1 variable2
(neighbor sum 4)

For each patch, sums the values of variable1 in the surrounding patches and puts
the resulting sum in variable2. nsum4 uses four neighboring patches (north,
east, west, south), while nsum uses eight neighboring patches (including diagonals).

Example:
nsum chemical temp
(Each patch sums the values of chemical in the eight neighboring patches and puts
the resulting sum in the variable temp.)
_____________________________________________________________
inspect
turtle#

Pops up a turtle monitor for the numbered turtle. If the turtle is dead it returns an error. _____________________________________________________________
osetbreed-of
turtle# number

Observer sets the breed of turtle# to number. If the turtle is dead, it returns an error.
_____________________________________________________________
osetbreed-at
xcor ycor number

Observer sets the breed of all turtles at xcor, ycor to number.
_____________________________________________________________
osetc-of
turtle# number

Observer sets the color of turtle# to number. If the turtle is dead, it returns an error.
_____________________________________________________________
oseth-of
turtle# number

Observer sets the heading of turtle# to number. if the turtle is dead, it returns an error.
_____________________________________________________________
osetpc-at
xcor ycor number

Observer sets the pc of patch at xcor ycor to number.
_____________________________________________________________
osetshape-of
turtle# number

Observer sets the shape of turtle# to number. If the turtle is dead, it returns an error.
_____________________________________________________________
osetshape-at
xcor ycor number

Observer sets the shape of all turtles at xcor, ycor to number.
_____________________________________________________________
hidden?-of
turtle#

Reports the hidden status of turtle turtle#. If the turtle is dead, it returns an error.
_____________________________________________________________
osetx-of
turtle# xcor

Observer sets the xcor of turtle turtle#. If the turtle is dead, it returns an error.
_____________________________________________________________
osety-of
turtle# ycor

Observer sets the ycor of turtle turtle#. If the turtle is dead, it returns an error.
_____________________________________________________________
osetxy-of
turtle# xcor ycor

Observer sets the xcor and ycor of turtle turtle#. If the turtle is dead, it returns an error.
=============================================================