_____________________________________________________________
color
color-of ID-number
color-at dx dy
color reports the color of a turtle.
If used by a patch, color reports the color of the turtle on the patch. If there are
several turtles on the patch, it arbitrarily chooses one of them. If there are no turtles
on the patch, it reports the patch¹s color.
color-of reports the color of the turtle with the given ID-number.
color-at reports the color of a turtle in the patch (dx, dy) units away. If
there are several turtles on the patch, it arbitrarily chooses one. If there are no turtles
on the patch, it reports the patch¹s color.
Example:
if color = white [fd 20]
(Moves all white turtles forward 20 steps.)
_____________________________________________________________
display
Turns on the StarLogo graphics display. (It is sometimes useful to turn off the
display to improve performance.)
_____________________________________________________________
no-display
Turns off the StarLogo graphics display. (It is sometimes useful to turn off the display
to improve performance.)
_____________________________________________________________
load-pict filename patch-variable
Takes a graphic image (in PICT format) from the given filename and loads a
gray-scale version of the image into the given patch-variable. Resizes the image
to fit in the StarLogo graphics window. (filename is from the directory from which
StarLogo was launched.)
_____________________________________________________________
mouse-down?
Reports if the mouse button is down. (If the mouse is outside of the StarLogo graphics
window, always reports false.)
_____________________________________________________________
mouse-xcor
mouse-ycor
mouse-xcor reports the StarLogo x-coordinate of the mouse. mouse-ycor
reports the StarLogo y-coordinate of the mouse. (If the mouse is outside of the StarLogo
graphics window, these procedures report values on the border of the window.)
_____________________________________________________________
print thing
Prints thing in the output window (with a carriage return). See also: type
If you want to print a string with special characters (like a space), enclose the string
in vertical bars (e.g. print "|New York|).
_____________________________________________________________
reset-timer, resett
Resets global clock to zero.
_____________________________________________________________
screen-edge
Reports the maximum x-coordinate (and maximum y-coordinate). This is the "half width"
of the StarLogo world. (The full width is actually (2 * screen-edge) + 1.)
_____________________________________________________________
screen-size
Reports the width (or height) of the StarLogo world. (In the current version, the StarLogo
world is always a square, so the width and height are always the same.) You can change the
size by changing the starlogo.patch file (see section 1.4).
_____________________________________________________________
show thing
Prints thing in the command center.
_____________________________________________________________
timer
Prints current value of the global clock in seconds.
_____________________________________________________________
type thing
Prints thing in the output window (without a carriage return). See also: print
If you want to print a string with special characters (like a space), enclose the string in
vertical bars.
Example:
type "|Number of turtles: | type turtle-total
(Prints something like Number of turtles: 247 in the output window)
_____________________________________________________________
word thing, thing
Concatenates the two inputs together and returns the result (as a symbol).
Example:
word "a "b
=> "ab
load-pict (word starlogo-directory "traffic.pict) foo
loads the picture traffic.pict (which is in the starlogo application
director) into patch variable foo.
=============================================================