Reference › Turtles — 141 commands


ambient

turtles

Input: none
Output: list

Returns the turtle's ambient light values, if the turtle is acting as a light. See setambient

show ambient

animate

turtles

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

turtles

Input: none
Output: color

Returns the color of the arrow that indicates the turtle's direction. See setarrowcolor, showarrow, hidearrow

show arrowcolor

arrowdistance

turtles

Input: none
Output: distance

Returns the distance of the turtle's directional arrow from the turtle. See setarrowdistance, showarrow, hidearrow

show arrowdistance

arrowsize

turtles

Input: none
Output: size

Returns the size of the directional arrow. See setarrowsize, showarrow, hidearrow

show arrowsize

backtrack

Also: bt

turtles

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

turtles

Input: bale (word)
Output: number

Returns a count of the current active members in a bale.

show balecount "bale

baleindex

turtles

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

turtles

Input: bale (word)
Output: list

Returns a list of all active bale members by index eg [1 2 5 7]

show balemembers "bale

balename

turtles

Input: none
Output: name (word)

Returns the name of the bale the calling turtle belongs to.

show balename

bales

turtles

Input: none
Output: list

Returns a list of the currently defined bales. See newbale

show bales

balesync

turtles

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

turtles

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

turtles

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

turtles

Input: none
Output: none

Returns the current camera (view) turtle.

cam:forward 20

clearhatchqueue

turtles

Input: none
Output: none

Clears the calling turtle's hatch queue. Any queued hatch requests are cleared. See hatch, hatchrate

clearhatchqueue

clearmodel

turtles

Input: modelname (word)
Output: none

Removes the specified model from memory.

clearmodel "model

clearmodels

turtles

Input: none
Output: none

Removes all user-defined models from memory.

clearmodels

clearturtlestack

turtles

Input: none
Output: none

Clears (erases) the currently selected 'turtle stack' used by pushturtle and popturtle. See turtlestack, setturtlestack.

clearturtlestack

cloneturtle

turtles

Input: sourceturtle (word) | destinationturtle (word)
Output: none

Clones a turtle.

cloneturtle "myrtle "max

copydef

turtles

Input: sourceprocedure (word) | procedurecopy (word)
Output: none

Copies a procedure inside a turtle to a procedure with the provided name

copydef "procedure "procedurecopy

copyproc

turtles

Input: procedure (word) | target (word)
Output: none

Copies a procedure from the calling turtle to the target turtle

copyproc "procedure "turtle

depopulate

turtles

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

turtles

Input: none
Output: list

Returns a list of the diffuse light values, if the turtle is a light. See setdiffuse

show diffuse

drain

turtles

Input: none
Output: none

Empties the calling turtle's message queue.

drain

fluid

turtles

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

turtles

Input: none
Output: number

Returns the fluid angle. See setfluidangle

show fluidangle

fluidinterval

turtles

Input: none
Output: number

Returns the number of milliseconds fluid waits between steps and angle movements. See setfluidinterval

show fluidinterval

fluidstep

turtles

Input: none
Output: number

Returns the fluid step value. See setfluidstep

show fluidstep

follow

Also: fo

turtles

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

turtles

Input: none
Output: turtle (word)

Returns the name of the turtle followed by the calling turtle, if any.

show following

group

turtles

Input: none
Output: word

Returns the turtle's current group, if any. See setgroup, groups

show group

groupies

turtles

Input: group (word)
Output: list

Returns a list of currently active members of the given group. See setgroup

show groupies "monkees

groups

turtles

Input: none
Output: list

Returns a list of the currently active groups. See setgroup

show groups

hatch

turtles

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

turtles

Input: none
Output: number

Returns the current hatch limit of the calling turtle. See sethatchlimit, hatch

show hatchlimit

hatchrate

turtles

Input: none
Output: number

Returns the current hatch rate of the calling turtle. See sethatchrate, hatch

show hatchrate

hatchlingname

turtles

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

turtles

Input: none
Output: none

Returns a list of hatchlings belonging to the selected turtle.

show myrtle:hatchlings

hatchlingworker

turtles

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

turtles

Input: none
Output: none

Hides all turtles. See showall

hideall
wait 60
showall

hideturtle

Also: ht

turtles

Input: none
Output: none

Hides the turtle's model. Show it again with showturtle.

hideturtle repeat 4 [forward 50 right 90] showturtle

libby

turtles

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

turtles

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

turtles

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

turtles

Input: none
Output: boolean

Returns true if there is a message waiting for the calling turtle. See listen, tell

show listenp

listmodels

turtles

Input: none
Output: none

Lists the calling turtle's models

listmodels

listturtles

turtles

Input: none
Output: none

Prints a table of the currently defined turtles, showing whether each one is idle or running. See turtles

listturtles

lockmodel

turtles

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

turtles

Input: target (word)
Output: none

locks the calling turtle's orientation to that of the target turtle. nomimic turns it off

mimic "snappy

mimicking

turtles

Input: none
Output: turtle (word)

Returns the name of the turtle the calling turtle is mimicking, if any.

show mimicking

models

turtles

Input: none
Output: list

Returns a list of the currently defined models.

show models
[myrtle turtle]

modelscale

turtles

Input: none
Output: scale (number)

Returns the calling turtle's current modelscale value. Default is 1. See setmodelscale

show modelscale

myrtle

turtles

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

turtles

Input: name (word)
Output: none

Creates a new turtle, but unlike newturtle does not switch to it on creation.

nameturtle "fred

newbale

turtles

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

turtles

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

turtles

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

turtles

Input: none
Output: none

Disables the calling turtle's animations, if any. See animate

noanimate

nobalesync

turtles

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

turtles

Input: mone
Output: none

Disables fluid mode on the calling turtle.

nofluid

nofollow

Also: nfo

turtles

Input: none
Output: none

Disables follow mode in the calling turtle.

nofollow

nolockmodel

turtles

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

turtles

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

turtles

Input: bale (word)
Output: none

Pauses the execution of the specified bale. See resumebale, stopbale, startbale

pausebale "bale

popturtle

Also: popt

turtles

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

turtles

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

turtles

Input: none
Output: list

Returns a list of the calling turtle's currently defined procedures.

show procs

pushturtle

Also: pusht

turtles

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

turtles

Input: turtle (word) | query (list)
Output: result

Allows you to query another turtle's internal state. See in

show query "snappy [position]

release

turtles

Input: none
Output: none

Erases all turtles except for Myrtle, Snappy and Libby, and any turtles that have defined procedures.

release

renameturtle

turtles

Input: oldname | newname
Output: none

Renames a turtle.

renameturtle "fred "doug

resetmodel

turtles

Input: none
Output: none

Resets the turtle's model to its default.

resetmodel

resetturtle

turtles

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

turtles

Input: bale (word)
Output: none

Resumes the bale of the given name. See suspendbale, stopbale, startbale

resumebale "bale

resumebalemember

turtles

Input: bale (word) | member (number)
Output: none

Resumes the execution of the specified bale member. See suspendbalemember

resumebalemember "bale 12

savemodel

turtles

Input: modelname (word) | modelfile (word)
Output: none

Saves the specified model name into the specified model file. See loadmodel

savemodel "mymodel "modelfile.mdl

saveturtle

turtles

Input: filename
Output: none

Saves the calling turtle's procedures to a file.

saveturtle

setambient

turtles

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

turtles

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

turtles

Input: size (number)
Output: none

Sets the size of the turtle's directional arrow. See showarrow, hidearrow

showarrow setarrowsize 30

setdiffuse

turtles

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

turtles

Input: angle (number)
Output: none

Sets the angular increments by which the turtle turns when fluid mode is on. See fluid

setfluidangle 5

setfluidinterval

turtles

Input: number
Output: none

Sets the number of milliseconds fluid waits between steps and angle movements. See fluidinterval

show setfluidinterval

setfluidstep

turtles

Input: steps (number)
Output: none

Sets the step increments by which the turtle moves when fluid mode is on. See fluid

setfluidstep 1

setgroup

turtles

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

turtles

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

turtles

Input: number
Output: none

Sets the number of hatchlings that can be hatched every second. See hatchrate

sethatchrate 100

setlight

turtles

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

turtles

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

turtles

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

turtles

Input: ratio (number)
Output: none

Scales the turtle's model based on the given ratio.

setmodelscale 2

setmodeltag

turtles

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

turtles

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

turtles

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

turtles

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

turtles

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

turtles

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

turtles

Input: state (list)
Output: none

Sets the turtle's state. See state

setstate snappy:state

setturtle

Also: tu

turtles

Input: turtlename (word)
Output: none

Sets the turtle to execute as to the provided turtlename. Shortcut is tu

setturtle myrtle
tu snappy

setturtlestack

turtles

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

turtles

Input: turtle (word)
Output: none

Sets the current "view turtle" - the turtle from whose viewpoint the display is generated.

setview "myrtle

setviewfar

turtles

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

turtles

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

turtles

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

turtles

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

turtles

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

turtles

Input: percentage (number)
Output: none

Sets the view turtle's camera 'zoom' - the default is 100%

setzoom 50

showall

turtles

Input: none
Output: none

Shows all turtles. See hideall

hideall
wait 60
showall

showarrow

turtles

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

turtles

Input: none
Output: none

Causes the turtle to display if hidden.

hideturtle forward 50 showturtle

sinceactive

turtles

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

turtles

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

turtles

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

turtles

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

turtles

Input: none
Output: number

Returns the spot cutoff value of the calling turtle, if that turtle is a light. See setspotcutoff

show spotcutoff

spotexp

turtles

Input: none
Output: number

Returns the spot exponent value of the calling turtle, if that turtle is a light. See setspotexp

show spotexp

state

turtles

Input: none
Output: list

Returns a list containing the entire turtle state. See setstate

show state

startbale

turtles

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

turtles

Input: bale (word)
Output: none

Stops the bale of the given name. See startbale, pausebale, newbale

stopbale "bale

stopbalemember

turtles

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

turtles

Input: bale (word) | member (number)
Output: none

Suspends the bale member, preventing it from executing. See resumebalemember

suspendbalemember "bale 12

swapcolors

turtles

Input: none
Output: none

Exchanges the current pen and fill colors and shades.

setpencolor 4 setfillcolor 13
swapcolors
show list pencolor fillcolor

tandem

turtles

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

turtles

Input: none
Output: turtle (word)

Returns the name of the turtle the calling turtle is tandeming, if any. See tandem

show tandeming

target

turtles

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

turtles

Input: none
Output: turtle (word)

Returns the name of the turtle the calling turtle is targeting, if any. See target

show targeting

tell

turtles

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

turtles

Input: none
Output: turtlename (word)

Returns the current turtle. See setturtle

show turtle
myrtle

turtles

turtles

Input: none
Output: turtlenames (list)

Lists the currently defined turtles.

show turtles
[myrtle libby snappy]

turtlestack

turtles

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

turtles

Input: none
Output: turtle-units (number)

Returns the value of the far clipping plane. See setviewfar

show viewfar

viewfov

turtles

Input: none
Output: angle (number)

Returns the current viewing angle, or field of view. See setviewfov

show viewfov

viewnear

turtles

Input: none
Output: turtle-units (number)

Returns the current near clipping plane. See setviewnear

show viewnear

viewturtle

turtles

Input: none
Output: word

Returns the current view turtle

show viewturtle
"snappy

viewvectors

turtles

Input: none
Output: list

Returns the calling turtle's view vectors. See setviewvectors

show viewvectors

window

turtles

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

turtles

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

turtles

Input: "animation number
Output: none

Plays the specified animation on the current turtle with the given delay in milliseconds.

fireanimation "walk 100

hidemesh

turtles

Input: "meshname
Output: none

Hides the specified mesh in the current turtle's model.

hidemesh "head

premodel

turtles

Input: none
Output: word

Returns the name of the turtle's pre-model (the model displayed before the main model loads).

print premodel