Reference › Turtles — 141 commands
ambient
Input: none
Output: list
Returns the turtle's ambient light values, if the turtle is acting as a light. See setambient
show ambient
animate
Input: milliseconds (number) OR movement (word) | frames (list)
Output: none
Animates the calling turtle, either by cycling through a series of models (frames) every x milliseconds regardless of movement, or by cycling through a series of models (frames) during each step of a fluid movement based on a particular command, such as forward. For example, animate 100 [model1 model2 model3] would cycle the turtle through the three given models every 100ms, regardless of if it is moving or not, while animate "forward [model1 model2 model3] will only animate the turtle when it moves forward. If fluid is enabled, multiple frames will be shown during the movement, otherwise only one frame of animation will advance per turtle command. noanimate disables ALL animations applied to the current turtle. Specifying an empty list of frames will also turn a specific animation type off (but leave it at the last model frame animated).
animate 1000 [myrtle shelly]
arrowcolor
Input: none
Output: color
Returns the color of the arrow that indicates the turtle's direction. See setarrowcolor, showarrow, hidearrow
show arrowcolor
arrowdistance
Input: none
Output: distance
Returns the distance of the turtle's directional arrow from the turtle. See setarrowdistance, showarrow, hidearrow
show arrowdistance
arrowsize
Input: none
Output: size
Returns the size of the directional arrow. See setarrowsize, showarrow, hidearrow
show arrowsize
backtrack
Also: bt
Input: none
Output: none
Backtrack deletes the last entry in the current turtle's track, that is, it undoes the last movement the current turtle made, the last turtle-specific setting that was changed (such as setpencolor) or the last object the turtle created.
forward 50 right 90 forward 50
backtrack
show pos
balecount
Input: bale (word)
Output: number
Returns a count of the current active members in a bale.
show balecount "bale
baleindex
Input: none
Output: number
Returns the bale 'index number' of the calling bale turtle. If called by a non-bale turtle returns 0. See balename, balemembers, newbale
show baleindex
balemembers
Input: bale (word)
Output: list
Returns a list of all active bale members by index eg [1 2 5 7]
show balemembers "bale
balename
Input: none
Output: name (word)
Returns the name of the bale the calling turtle belongs to.
show balename
bales
Input: none
Output: list
Returns a list of the currently defined bales. See newbale
show bales
balesync
Input: bale (word)
Output: none
Enables 'syncing' of the bale, that is, the bale's graphical state is updated simultaneously once all bale members have executed an iteration of the bale's code. This is the default state of a new bale. See nobalesync, which disables this, and balesyncp which returns true if the bale is syncing (what are you syncing?)
balesync "mybale
bounce
Input: none
Output: none
Sets 'bounce' mode, in which the turtle deflects off of the edges of the area defined by bounds. See fence, wrap, window
setbounds [-50 -50 50 50] bounce
forward 70
show list ypos heading
bounds
Input: none
Output: list
Returns the current boundaries of the turtle's fence and wrap areas, set with setbounds. See fence, wrap, window.
show bounds
cam
Input: none
Output: none
Returns the current camera (view) turtle.
cam:forward 20
clearhatchqueue
Input: none
Output: none
Clears the calling turtle's hatch queue. Any queued hatch requests are cleared. See hatch, hatchrate
clearhatchqueue
clearmodel
Input: modelname (word)
Output: none
Removes the specified model from memory.
clearmodel "model
clearmodels
Input: none
Output: none
Removes all user-defined models from memory.
clearmodels
clearturtlestack
Input: none
Output: none
Clears (erases) the currently selected 'turtle stack' used by pushturtle and popturtle. See turtlestack, setturtlestack.
clearturtlestack
cloneturtle
Input: sourceturtle (word) | destinationturtle (word)
Output: none
Clones a turtle.
cloneturtle "myrtle "max
copydef
Input: sourceprocedure (word) | procedurecopy (word)
Output: none
Copies a procedure inside a turtle to a procedure with the provided name
copydef "procedure "procedurecopy
copyproc
Input: procedure (word) | target (word)
Output: none
Copies a procedure from the calling turtle to the target turtle
copyproc "procedure "turtle
depopulate
Input: number | bale
Output: none
Removes the specified number of turtles to the given bale name, based on the lowest-numbered turtles first. See populate, newbale, startbale
depopulate 10 "bale
diffuse
Input: none
Output: list
Returns a list of the diffuse light values, if the turtle is a light. See setdiffuse
show diffuse
drain
Input: none
Output: none
Empties the calling turtle's message queue.
drain
fluid
Input: none
Output: none
Turns on 'fluid' mode, which causes the turtle to move incrementally. If the turtle is hidden, fluid is automatically disabled while it is hidden. Note that this can affect procedures that use the orbit commands while fluid is enabled. See nofluid
fluid
fluidangle
Input: none
Output: number
Returns the fluid angle. See setfluidangle
show fluidangle
fluidinterval
Input: none
Output: number
Returns the number of milliseconds fluid waits between steps and angle movements. See setfluidinterval
show fluidinterval
fluidstep
Input: none
Output: number
Returns the fluid step value. See setfluidstep
show fluidstep
follow
Also: fo
Input: turtle (word)
Output: none
Causes the calling turtle to 'follow' the specified turtle. Can only be set if the turtle is the view (camera) turtle.
follow myrtle
following
Input: none
Output: turtle (word)
Returns the name of the turtle followed by the calling turtle, if any.
show following
group
Input: none
Output: word
Returns the turtle's current group, if any. See setgroup, groups
show group
groupies
Input: group (word)
Output: list
Returns a list of currently active members of the given group. See setgroup
show groupies "monkees
groups
Input: none
Output: list
Returns a list of the currently active groups. See setgroup
show groups
hatch
Input: list
Output: none
Hatch creates a new turtle that contains a copy of the calling turtle's global (variable) containers and loop counters at the calling turtle's position and orientation and then executes the requests specified in the provided list in a new thread. Hatchling models are hidden when they are created. The hatchling is automatically given an incremental name based on the name of the turtle that called hatch. Once all the given requests have been executed the hatchling dies and its turtle track is deleted. hatchlimit and hatchrate moderate the creation of hatchlings, the first the total number that can be 'alive' at one time (default 100) and the second the number that can be created each second. If you wish to save its turtle track, you will need to use merge. You can use the parent: prefix (eg parent:fillcolor) to retrieve parental attributes. Finally, hatch calls updatestate if norender or notrackrender is on, to ensure it is hatched in the right place. See merge, die, calm
hatch [right random 360 forward 100]
make "duck 5 hatch [inc "duck show :duck] wait 20 show :duck
6
5
hatchlimit
Input: none
Output: number
Returns the current hatch limit of the calling turtle. See sethatchlimit, hatch
show hatchlimit
hatchrate
Input: none
Output: number
Returns the current hatch rate of the calling turtle. See sethatchrate, hatch
show hatchrate
hatchlingname
Input: workerid (number)
Output: turtlename (word)
Returns the name of the hatchling controlled by the given worker IF that worker was created with a hatchling.
show hatchlingname 17
hatchlings
Input: none
Output: none
Returns a list of hatchlings belonging to the selected turtle.
show myrtle:hatchlings
hatchlingworker
Input: turtlename (word)
Output: 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
hideall
Input: none
Output: none
Hides all turtles. See showall
hideall
wait 60
showall
hideturtle
Also: ht
Input: none
Output: none
Hides the turtle's model. Show it again with showturtle.
hideturtle repeat 4 [forward 50 right 90] showturtle
libby
Input: none
Output: "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
light
Input: none
Output: 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
listen
Input: none
Output: 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
listenp
Input: none
Output: boolean
Returns true if there is a message waiting for the calling turtle. See listen, tell
show listenp
listmodels
Input: none
Output: none
Lists the calling turtle's models
listmodels
listturtles
Input: none
Output: none
Prints a table of the currently defined turtles, showing whether each one is idle or running. See turtles
listturtles
lockmodel
Input: none
Output: none
Locks the model of the calling turtle so that it no longer faces the turtle's orientation and stays with the current orientation regardless of subsequent moves. nolockmodel resumes normal behavior. See nolockmodel, lockmodelp
lockmodel
mimic
Input: target (word)
Output: none
locks the calling turtle's orientation to that of the target turtle. nomimic turns it off
mimic "snappy
mimicking
Input: none
Output: turtle (word)
Returns the name of the turtle the calling turtle is mimicking, if any.
show mimicking
models
Input: none
Output: list
Returns a list of the currently defined models.
show models
[myrtle turtle]
modelscale
Input: none
Output: scale (number)
Returns the calling turtle's current modelscale value. Default is 1. See setmodelscale
show modelscale
myrtle
Input: none
Output: "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
nameturtle
Input: name (word)
Output: none
Creates a new turtle, but unlike newturtle does not switch to it on creation.
nameturtle "fred
newbale
Input: name (word)
Output: none
Creates a new 'bale', or group of turtles. Turtles in bales execute code in two stages: first, each turtle executes the init procedure defined inside of the bale (output can be used to pass parameters to the main procedure), and then second they execute the main procedure defined inside of the bale repeatedly until stopped or suspended. Each turtle in the bale executes consecutively, using a single worker, ensuring they remain synchronised, and reducing load on the host computer.
Bales can also contain triggers and other procedures that can be called from init or main. die causes the calling bale turtle to be removed from the bale and cease existing. The name of a bale turtle is a combination of its numerical index inside the bale, and the name of the bale itself, eg bale12. newbale is declared in the workspace similarly to newturtle. You start a bale using startbale.
Global containers are shared between bale members, and so containers specific to individual bale members need to be declared private or local (local variables only exist for the specific iteration of the bale code execution).
See startbale, stopbale, pausebale, resumebale, balename, baleindex, balemembers, populate, depopulate, balep, baleactivep, balepausedp, baleindexp
newbale "bale
newmodel
Input: name (word) | tagname (word) or [command list] (list)
Output: none
Creates a new model, using either the contents of the specified tag, or the provided list of turtle commands. Note that due to the nature of models, setvectors does not work properly inside of a model definition. See setmodel
newmodel "sphere [icosphere 20]
newmodel "fromtag "tag
newturtle
Also: newtu
Input: name (word)
Output: none
Creates a new turtle with the given name. The turtle is hidden by default, and is hidden when reset is called.
newturtle "daisy
noanimate
Input: none
Output: none
Disables the calling turtle's animations, if any. See animate
noanimate
nobalesync
Input: bale (word)
Output: none
Disables bale syncing, which causes all graphical bale updates to happen at the end of an iteration of collective execution. See balesync
nobalesync "mybale
nofluid
Input: mone
Output: none
Disables fluid mode on the calling turtle.
nofluid
nofollow
Also: nfo
Input: none
Output: none
Disables follow mode in the calling turtle.
nofollow
nolockmodel
Input: none
Output: none
Unlocks the model of the calling turtle so that it faces the turtle's orientation again. See lockmodel, lockmodelp
nolockmodel
parent
Input: none
Output: turtle-name (word)
Returns the name of the calling turtle's direct parent, or nothing if calling turtle is root turtle.
show parent
pausebale
Input: bale (word)
Output: none
Pauses the execution of the specified bale. See resumebale, stopbale, startbale
pausebale "bale
popturtle
Also: popt
Input: none
Output: none
'Pops' a turtle state off of the stack and restores the turtle to it. See pushturtle
repeat 6 [pushturtle forward 40 popturtle right 60]
populate
Input: number | bale or [bale param1 param2…]
Output: none
Adds the specified number of turtles to the given bale name. If a list is provided for the bale name, the provided parameters are passed to the init procedure within the bale by each new bale member. See depopulate, newbale, startbale
populate 10 "bale
procs
Input: none
Output: list
Returns a list of the calling turtle's currently defined procedures.
show procs
pushturtle
Also: pusht
Input: none
Output: 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. See popturtle
pushturtle forward 50 popturtle
right 90 forward 50
show pos
query
Input: turtle (word) | query (list)
Output: result
Allows you to query another turtle's internal state. See in
show query "snappy [position]
release
Input: none
Output: none
Erases all turtles except for Myrtle, Snappy and Libby, and any turtles that have defined procedures.
release
renameturtle
Input: oldname | newname
Output: none
Renames a turtle.
renameturtle "fred "doug
resetmodel
Input: none
Output: none
Resets the turtle's model to its default.
resetmodel
resetturtle
Input: none
Output: none
Resets the calling turtle, which initializes it similarly to reset, but only the calling turtle.
forward 50 right 90
resetturtle
show list pos heading
resumebale
Input: bale (word)
Output: none
Resumes the bale of the given name. See suspendbale, stopbale, startbale
resumebale "bale
resumebalemember
Input: bale (word) | member (number)
Output: none
Resumes the execution of the specified bale member. See suspendbalemember
resumebalemember "bale 12
savemodel
Input: modelname (word) | modelfile (word)
Output: none
Saves the specified model name into the specified model file. See loadmodel
savemodel "mymodel "modelfile.mdl
saveturtle
Input: filename
Output: none
Saves the calling turtle's procedures to a file.
saveturtle
setambient
Input: RGBA (list)
Output: 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]
setarrowdistance
Input: distance (number)
Output: none
Sets the distance the turtle's directional arrow is from the turtle's position. See showarrow, hidearrow
setarrowdistance 10
setarrowsize
Input: size (number)
Output: none
Sets the size of the turtle's directional arrow. See showarrow, hidearrow
showarrow setarrowsize 30
setdiffuse
Input: RGBA
Output: 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]
setfluidangle
Input: angle (number)
Output: none
Sets the angular increments by which the turtle turns when fluid mode is on. See fluid
setfluidangle 5
setfluidinterval
Input: number
Output: none
Sets the number of milliseconds fluid waits between steps and angle movements. See fluidinterval
show setfluidinterval
setfluidstep
Input: steps (number)
Output: none
Sets the step increments by which the turtle moves when fluid mode is on. See fluid
setfluidstep 1
setgroup
Input: group (word)
Output: none
Sets the turte's group to the provided name. Useful to keep track of hatchlings of a particular ilk. nearme and near can be used to detect members of specific groups. See also groupies, which returns the group's active members, group and groups.
setgroup "chipmunks
sethatchlimit
Input: number
Output: none
Sets the total number of hatchlings allowed to exist belonging to the calling turtle at any one time. Additional hatch requests are queued until existing hatchlings cease execution. The default hatchlimit is 100. See hatchlimit, clearhatchqueue.
sethatchlimit 20
sethatchrate
Input: number
Output: none
Sets the number of hatchlings that can be hatched every second. See hatchrate
sethatchrate 100
setlight
Input: number
Output: 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
setlockelevationmode
Input: [point] OR [sphere <diameter>] OR [voxel [x1 y1 z1][x2 y2 z2]]
Output: none
Sets the method used by lockelevation. Point simply alters the elevation when the turtle's position strays into a new sector. Sphere alters the position if any of the area of a sphere of the specified diameter surrounding the turtle's position enters a new sector. Voxel does similarly with the area of the voxel offset from the turtle's position, as such the first list values need to be negative in order to include the turtle position within that area. See lockelevationmode
setlockelevationmode [sphere 5]
setlockelevationmode [voxel [-10 -10 -10][10 10 10]]
setmodel
Input: modelname (word) OR [list of instructions]
Output: none
Sets the turtle model to the specified model name or constructs a temporary model using the given list of instructions. Note that you cannot execute a procedure inside of a setmodel list, and you should use tags and newmodel to construct a model in that way. Note that in physics modes, the center of gravity of the turtle model is its origin (starting) point – so you may need to move the turtle when you start the model to compensate. See newmodel, setmodelscale Built-in models: myrtle, turtle, spaceship, astronaut, plane, invisible
setmodel "plane
setmodelscale
Input: ratio (number)
Output: none
Scales the turtle's model based on the given ratio.
setmodelscale 2
setmodeltag
Input: tagname (word) | [tagcontents] (list) OR [tag1 tag2…] (list) | [[tagcontents1][tagcontents2]…] (list of lists)
Output: none
Replaces the contents of the given tag with the given contens in the model of the calling turtle. Allows for more complex model animations, but these must be managed with user code, as opposed to animate. See setmodel, begintag
setmodeltag "mytag [rt 90]
setmodeltag [mytag1 mytag2] [[rt 90][fd 20]]
setpremodel
Input: instructions [list]
Output: none
Allows you to insert directional and movement 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. Note that premodel obeys modelscale, and so premodel instructions are multiplied by the modelscale value if set. setpremodel does not cause the physics body (hull) to be regenerated and as such may cause odd effects in physical modes.
setpremodel [up 90]
setspecular
Input: RGBA (list)
Output: 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]
setspeed
Also: sspd
Input: microseconds (mumber)
Output: 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
setspotcutoff
Input: number
Output: none
Sets the spot light cutoff value of the calling turtle, if that turtle is a light. See spotcutoff
setspotcutoff 1
setspotexp
Input: number
Output: none
Sets the spot light exponent value of the calling turtle, if that turtle is a light. See spotexp
setspotexp 0
setstate
Input: state (list)
Output: none
Sets the turtle's state. See state
setstate snappy:state
setturtle
Also: tu
Input: turtlename (word)
Output: none
Sets the turtle to execute as to the provided turtlename. Shortcut is tu
setturtle myrtle
tu snappy
setturtlestack
Input: number
Output: none
Sets (selects) the 'turtle stack' used by pushturtle and popturtle. See turtlestack, which returns the calling turtles current stack number, and clearstack, which clears the selected stack.
setturtlestack 2
setview
Also: sv
Input: turtle (word)
Output: none
Sets the current "view turtle" - the turtle from whose viewpoint the display is generated.
setview "myrtle
setviewfar
Input: distance (number)
Output: none
Sets the far clipping plane, the distance at which OpenGL objects stop being rendered or are clipped. This must be set by the view turtle. See setviewnear
setviewfar 1000
setviewfov
Input: angle (number)
Output: none
Sets the turtle's viewing angle, the angle of view displayed in the window. The default is 60
setviewfov 60
setviewnear
Input: distance (number)
Output: none
Sets the near clipping plane. OpenGL objects closer than this distance are not rendered or are clipped. This must be set by the view turtle. See setviewfar
ask "snappy [setviewnear 50]
setviewpoint
Input: list
Output: none
Positions the view by the provided [X (left-right) Y (down-up) Z (back-forward)] list of turtle units, where a negative value has the first effect and a positive value has the second effect.
setviewpoint [10 -10 0]
setviewvectors
Input: vectors (list)
Output: none
Sets arbitrary view vectors for the current turtle. When selected as a view (camera) turtle, if viewvectors are set the display will always be rendered in the direction and orientation specified by those vectors, regardless of the turtle's orientation. To return to using the turtle's orientation, specify an empty list, eg: setviewvectors []
setviewvectors vectors
setzoom
Input: percentage (number)
Output: none
Sets the view turtle's camera 'zoom' - the default is 100%
setzoom 50
showall
Input: none
Output: none
Shows all turtles. See hideall
hideall
wait 60
showall
showarrow
Input: none
Output: none
Shows the directional arrow, which indicates the direction the turtle is facing. See hidearrow, setarrowsize, setarrowdistance
showarrow setarrowsize 2
right 45
showturtle
Also: st
Input: none
Output: none
Causes the turtle to display if hidden.
hideturtle forward 50 showturtle
sinceactive
Input: turtlename
Output: 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
snappy
Input: none
Output: "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
specular
Input: none
Output: none
Returns the specular RGBA values of the calling turtle, if that turtle is acting as a light. See setspecular
show specular
speed
Input: none
Output: 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
spotcutoff
Input: none
Output: number
Returns the spot cutoff value of the calling turtle, if that turtle is a light. See setspotcutoff
show spotcutoff
spotexp
Input: none
Output: number
Returns the spot exponent value of the calling turtle, if that turtle is a light. See setspotexp
show spotexp
state
Input: none
Output: list
Returns a list containing the entire turtle state. See setstate
show state
startbale
Input: bale (word) or [bale param1 param2] | initialnumber or [initialnumber workers]
Output: none
Starts a bale executing if not already executing and creates the given initialnumber of bale turtles, passing the optional parameters to the init procedure inside the bale if provided. If the number of balemembers is provided as a list, the second parameter in that list is the number of workers to distribute the turtles across (which can be used for performance tuning.) Note that a bale can be started with 0 members, which does not automatically cause a bale to cease operating, it just doesn't execute any code unless it has at least one active member. It can only be fully stopped by calling stopbale. See newbale, stopbale, pausebale, resumebale
startbale "bale 20
startbale [bale param1 param2] 10
stopbale
Input: bale (word)
Output: none
Stops the bale of the given name. See startbale, pausebale, newbale
stopbale "bale
stopbalemember
Input: bale (word) | index (number)
Output: none
Stops the bale member of the given index in the given bale. Similar to as if the bale member called die. See startbale, suspendbalemember, resumebalemember
stopbalemember "bale 12
suspendbalemember
Input: bale (word) | member (number)
Output: none
Suspends the bale member, preventing it from executing. See resumebalemember
suspendbalemember "bale 12
swapcolors
Input: none
Output: none
Exchanges the current pen and fill colors and shades.
setpencolor 4 setfillcolor 13
swapcolors
show list pencolor fillcolor
tandem
Input: target (word) or [target boolx booly boolz] (list)
Output: 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. If tandem's arguments are provided as a list, the tandeming turtle only updates if the target turtle moves on the specified axes. tandem does not update the orientation of the calling turtle, only its position. notandem turns it off
tandem "myrtle
tandeming
Input: none
Output: turtle (word)
Returns the name of the turtle the calling turtle is tandeming, if any. See tandem
show tandeming
target
Input: turtle (word)
Output: 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
targeting
Input: none
Output: turtle (word)
Returns the name of the turtle the calling turtle is targeting, if any. See target
show targeting
tell
Input: turtle (word) or turtles (list) | message (number, word or list)
Output: none
Sends a message to the target turtle containing the provided number, word or list. See listen
tell snappy "hello
turtle
Input: none
Output: turtlename (word)
Returns the current turtle. See setturtle
show turtle
myrtle
turtles
Input: none
Output: turtlenames (list)
Lists the currently defined turtles.
show turtles
[myrtle libby snappy]
turtlestack
Input: none
Output: number
Returns the current turtle stack, the stack used by pushturtle and popturtle. See clearstack, which clears the stack, and setturtlestack, which allows you to select (and use) a different turtle stack, with the ability to return to the current one, whose default value is 1.
show turtlestack
1
viewfar
Input: none
Output: turtle-units (number)
Returns the value of the far clipping plane. See setviewfar
show viewfar
viewfov
Input: none
Output: angle (number)
Returns the current viewing angle, or field of view. See setviewfov
show viewfov
viewnear
Input: none
Output: turtle-units (number)
Returns the current near clipping plane. See setviewnear
show viewnear
viewturtle
Input: none
Output: word
Returns the current view turtle
show viewturtle
"snappy
viewvectors
Input: none
Output: list
Returns the calling turtle's view vectors. See setviewvectors
show viewvectors
window
Input: none
Output: none
Sets 'window' mode, in which the turtle is unrestricted and can leave the area defined by bounds. See fence, wrap, bounce
setbounds [-50 -50 50 50] window
forward 70
show ypos
wrap
Input: none
Output: 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.
setbounds [-50 -50 50 50] wrap
forward 70
show ypos
fireanimation
Input: "animation number
Output: none
Plays the specified animation on the current turtle with the given delay in milliseconds.
fireanimation "walk 100
hidemesh
Input: "meshname
Output: none
Hides the specified mesh in the current turtle's model.
hidemesh "head
premodel
Input: none
Output: word
Returns the name of the turtle's pre-model (the model displayed before the main model loads).
print premodel