turtles
none
list
Returns the turtle’s ambient light values, if the turtle is acting as a light. See setambient
show ambient
turtles
none
color
Returns the color of the arrow that indicates the turtle’s direction. See setarrowcolor, showarrow, hidearrow
show arrowcolor
turtles
none
distance
Returns the distance of the turtle’s directional arrow from the turtle. See setarrowdistance, showarrow, hidearrow
show arrowdistance
turtles
none
size
Returns the size of the directional arrow. See setarrowsize, showarrow, hidearrow
show arrowsize
turtles
sourceturtle (word) | destinationturtle (word)
none
Clones a turtle.
cloneturtle "myrtle "max
turtles
sourceprocedure (word) | procedurecopy (word)
none
Copies a procedure inside a turtle to a procedure with the provided name
copydef "procedure "procedurecopy
turtles
procedure (word) | target (word)
none
Copies a procedure from the calling turtle to the target turtle
copyproc "procedure "turtle
turtles
none
list
Returns a list of the diffuse light values, if the turtle is a light. See setdiffuse
show diffuse
turtles
none
none
Empties the calling turtle’s message queue.
drain
turtles
none
none
Turns on ‘fluid’ mode, which causes the turtle to move incrementally. See nofluid
fluid
turtles
none
number
Returns the fluid angle. See setfluidangle
show fluidangle
turtles
none
number
Returns the fluid step value. See setfluidstep
show fluidstep
turtles
turtle (word)
none
Causes the calling turtle to ‘follow’ the specified turtle. Can only be set if the turtle is the view (camera) turtle.
follow myrtle
turtles
none
turtle (word)
Returns the name of the turtle followed by the calling turtle, if any.
show following
turtles
list
none
Hatch clones the selected turtle and then executes the requests specified in the provided list in a new thread. It is automatically given an incremental name based on the name of the turtle that called hatch. A hatchlings HOME is its position when it is hatched. Once all the given requests have been executed the hatchling dies and its turtle track is deleted. If you wish to save its turtle track, you will need to use merge. See merge
hatch [right random 360 forward 100]
turtles
none
number
Returns the current hatch limit of the calling turtle. See sethatchlimit, hatch
show hatchlimit
turtles
workerid (number)
turtlename (word)
Returns the name of the hatchling controlled by the given worker IF that worker was created with a hatchling.
show hatchlingname 17
turtles
none
none
Returns a list of hatchlings belonging to the selected turtle.
show myrtle:hatchlings
turtles
turtlename (word)
workerid (number)
Returns the id number of the worker created with the specified hatchling, if the name supplied is that of a hatchling.
show hatchlingworker "hatchling123
12
turtles
none
none
Hides all turtles. See showall
hideall
turtles
none
none
Hides the turtle’s model. Show it again with showturtle
hideturtle
turtles
none
“libby
Libby is the library turtle. She stores procedures to be used by any other turtle. She does not execute procedures herself. The libby primitive simply returns “libby, to avoid having to put the ” on the front of her name when addressing her. See myrtle, snappy
setturtle libby
turtles
none
number
Returns the light status of the calling turtle, either 0 (not a light), 1 (spot light) or 2 (point light). See setlight
show light
turtles
none
message (list)
Returns the message on the top of the messsage queue, which is a list containing two items: the name of the turtle that sent the message, and the message itself (which can be a number, word or list). If there are no messages in the queue, listen will block until there is a message to retrieve.
show listen
turtles
none
boolean
Returns true if there is a message waiting for the calling turtle. See listen, tell
show listenp
turtles
target (word)
none
locks the calling turtle’s orientation to that of the target turtle. nomimic turns it off
mimic "snappy
turtles
none
turtle (word)
Returns the name of the turtle the calling turtle is mimicking, if any.
show mimicking
turtles
none
“myrtle
Myrtle is the turtle you see when you start up turtleSpaces, and she is the first turtle selected. Her name simply returns “myrtle, so a quote is unneeded when you invoke setturtle myrtle. See snappy, libby
setturtle myrtle
turtles
name (word)
none
Creates a new turtle, but unlike newturtle does not switch to it on creation.
nameturtle "fred
turtles
name (word)
none
Creates a new turtle with the given name.
newturtle "daisy
turtles
mone
none
Disables fluid mode on the calling turtle.
nofluid
turtles
none
none
Disables follow mode in the calling turtle.
nofollow
turtles
none
none
‘Pops’ a turtle state off of the stack and restores the turtle to it. See pushturtle
popturtle
turtles
none
list
Returns a list of the calling turtle’s currently defined procedures.
show procs
turtles
none
none
‘Pushes’ the state of the turtle on to a stack (position, pen color, etc.) popturtle pulls the state back off of the stack again. Imagine drawing a tree with randomly extending branches. You can construct it by pushing the turtle’s state at each junction, then popping the turtle to return to it, then the previous one, etc.
pushturtle
turtles
turtle (word) | query (list)
result
Allows you to query another turtle’s internal state. See in
show query "snappy [position]
turtles
none
none
Erases all turtles except for Myrtle, Snappy and Libby, and any turtles that have defined procedures.
release
turtles
oldname | newname
none
Renames a turtle.
renameturtle "fred "doug
turtles
filename
none
Saves the calling turtle’s procedures to a file.
saveturtle
turtles
RGBA (list)
none
Sets the ambient light values (red, green, blue, and opacity) of the calling turtle, if the turtle is acting as a light. See ambient
setambient [50 50 50 100]
turtles
distance (number)
none
Sets the distance the turtle’s directional arrow is from the turtle’s position. See showarrow, hidearrow
setarrowdistance 10
turtles
size (number)
none
Sets the size of the turtle’s directional arrow. See showarrow, hidearrow
turtles
RGBA
none
Sets the diffuse light RGBA values of the calling turtle, if that turtle is acting as a light. See diffuse
setdiffuse [50 50 50 100]
turtles
angle (number)
none
Sets the angular increments by which the turtle turns when fluid mode is on. See fluid
setfluidangle 5
turtles
steps (number)
none
Sets the step increments by which the turtle moves when fluid mode is on. See fluid
setfluidstep 1
turtles
number
none
Sets the number of hatchlings that can be hatched every second.
sethatchlimit 100
turtles
number
none
Sets the light status of the calling turtle to either 0 (not a light), 1 (spot light) or 2 (point light). See light
setlight 1
turtles
modelname (word)
none
Sets the turtle model to the specified model name. See newmodel, setmodelscale Built-in models: myrtle, turtle, spaceship, astronaut, plane, invisible
setmodel "plane
turtles
ratio (number)
none
Scales the turtle’s model based on the given ratio.
setmodelscale 2
turtles
instructions [list]
none
Allows you to insert instructions between the end of the turtle track and the start of the model. Mostly used to alter the orientation of the model, for example to point the turtle upwards when orbiting a point, rather than pointing at the point, as in the startup animation, or to rotate the model without affecting its logical orientation.
setpremodel [up 90]
turtles
RGBA (list)
none
Sets the specular RGBA values of the calling turtle, if the turtle is acting as a light. See specular
setspecular [50 50 50 100]
turtles
microseconds (mumber)
none
Sets the number of microseconds the turtle sleeps between executing each instruction, an instruction being a fully formed statement, such as print position, or right sum 20 30. The default is 500 (half of a millisecond). Note that if you set this to a low value, or 0, you may use a large percentage of your host computer’s available CPU time, and may cause issues with your operating system’s overall performance! See speed
setspeed 200
turtles
number
none
Sets the spot light cutoff value of the calling turtle, if that turtle is a light. See spotcutoff
setspotcutoff 1
turtles
number
none
Sets the spot light exponent value of the calling turtle, if that turtle is a light. See spotexp
setspotexp 0
turtles
state (list)
none
Sets the turtle’s state. See state
setstate snappy:state
turtles
turtlename (word)
none
Sets the turtle to execute as to the provided turtlename. Shortcut is tu
setturtle myrtle
tu snappy
turtles
none
none
Shows all turtles. See hideall
showall
turtles
none
none
Shows the directional arrow, which indicates the direction the turtle is facing. See hidearrow, setarrowsize, setarrowdistance
showarrow
turtles
turtlename
milliseconds
Returns the number of milliseconds since the turtle added to its track, by moving, creating an object or changing a turtle parameter such as the pen color.
print myrtle:sinceactive
turtles
none
“snappy
Snappy is the default ‘view’ turtle, one of the three turtles created when a space is initialized, and the first turtle from whose perspective you see when you start up turtleSpaces. While other turtles (except for Libby) can both create things and be seen out from, Snappy can only move and be used as a view turtle, and cannot create items in his ‘turtle track’ (eg create lines or shapes). See myrtle, libby
setview snappy
turtles
none
none
Returns the specular RGBA values of the calling turtle, if that turtle is acting as a light. See setspecular
show specular
turtles
none
microseconds (number)
Returns the current speed value, the number of microseconds the turtle ‘sleeps’ between the execution of each instruction. The default speed value is 500 microseconds, or half a millisecond. See setspeed
show speed
turtles
none
number
Returns the spot cutoff value of the calling turtle, if that turtle is a light. See setspotcutoff
show spotcutoff
turtles
none
number
Returns the spot exponent value of the calling turtle, if that turtle is a light. See setspotexp
show spotexp
turtles
none
list
Returns a list containing the entire turtle state. See setstate
show state
turtles
none
none
Exchanges the current pen and fill colors and shades.
swapcolors
turtles
target (word)
none
keeps calling turtle in the same relative position (based on the orientation) of the target turtle as when tandem was called (for example, if the target moves, or rotates). If the calling turtle changes position using FD, etc., its relative position for the purposes of tandem is updated. tandem does not update the orientation of the calling turtle, only its position. notandem turns it off
tandem "myrtle
turtles
none
turtle (word)
Returns the name of the turtle the calling turtle is tandeming, if any. See tandem
show tandeming
turtles
turtle (word)
none
Causes the calling turtle to face the specified target turtle. A turtle may only target one turtle at a time. notarget turns it off. See notarget
target "myrtle
turtles
none
turtle (word)
Returns the name of the turtle the calling turtle is targeting, if any. See target
show targeting
turtles
turtle (word) or turtles (list) | message (number, word or list)
none
Sends a message to the target turtle containing the provided number, word or list. See listen
tell snappy "hello
turtles
none
turtlename (word)
Returns the current turtle. See setturtle
show turtle
myrtle
turtles
none
none
Sets ‘window’ mode, in which the turtle is unrestricted and can leave the area defined by bounds. See fence, wrap
window
turtles
none
none
Sets the turtle in wrap mode, which means if the turtle reaches the edge of the area defined by setbounds, it wraps to the opposite side of that area. See window, fence.
wrap