Spis poleceń › Boolean — poleceń: 172
~
Wejście: number | number
Wyjście: boolean
Approximate. Similar to round (number) = round (number) - returns true if the rounded inputs are equal. Similar to approximate
show 5.4 ~ 4.7
TRUE
afterp
Wejście: word1 | word2
Wyjście: boolean
afterp outputs true if word1 comes after word2. To make the comparison, Logo uses the ASCII codes of the characters in the words. Note that all uppercase letters come before all lowercase letters. See beforep
show afterp "bread "apple
TRUE
andp
Wejście: value (word, number or list) | comparitors (list or list of lists)
Wyjście: boolean
Compares a value to a number of other values, either with or without a comparison operator. If there is no operator, it tests if they are equivalent. See nandp, orp
if andp "duck [duck duck goose] [pr "quack]
if andp 5 [[> 2][< 10][!= 7]] [pr "true]
approximatep
Wejście: number | number
Wyjście: boolean
Returns true if the rounded value of the first number is the same as the rounded value of the second number. Similar to ~. See round
show approximatep 5.4 4.8
TRUE
archonp
Wejście: none
Wyjście: boolean
Returns true if the archon (or main thread, used by the console) is executing.
show archonp
arrowp
Wejście: none
Wyjście: boolean
Returns true if the directional arrow is enabled. See showarrow, hidearrow
show arrowp
attenuatep
Wejście: none
Wyjście: boolean
Returns true if the calling turtle is currently attenuating its sound.
show attenuatep
audiop
Wejście: none
Wyjście: boolean
audiop returns the audio state. See audio
show audiop
audiowaitp
Wejście: none
Wyjście: boolean
Returns true if autowait is set on. See audiowait
show audiowaitp
baleactivep
Wejście: name (word)
Wyjście: boolean
Returns true if the bale of the specified name is currently active or running.
show baleactivep "bale
baleindexp
Wejście: bale (word) | index (number)
Wyjście: boolean
Returns true if the turtle of the given index inside the given bale exists / is active. See newbale, baleindex
show baleindexp "bale 5
balep
Wejście: name (word)
Wyjście: boolean
Returns true if the given bale name exists. See newbale
show balep "bale
balepausedp
Wejście: name (word)
Wyjście: boolean
Returns true if the bale of the given name is currently paused. See pausebale, resumebale
show balepausedp
balesyncp
Wejście: bale (word)
Wyjście: boolean
Returns true if the given bale is syncing. See balesync
show balesyncp "mybale
beatp
Wejście: none
Wyjście: boolean
Returns true if the beat has advanced since last read. See beat.
show beatp
beatsyncp
Wejście: none
Wyjście: boolean
Returns true if beatsync is currently on. See beatsync, nobeatsync (which turns it off)
show beatsyncp
true
beforep
Wejście: word1 | word2
Wyjście: boolean
beforep outputs true if word1 comes before word2. To make the comparison, Logo uses the ASCII codes of the characters in the words. Note that all uppercase letters come before all lowercase letters. See afterp
show beforep "bread "apple
FALSE
blocksp
Wejście: none
Wyjście: boolean
Returns true if blocks mode is enabled.
show blocksp
bouncep
Wejście: none
Wyjście: boolean
Returns true if the turtle is currently in 'bounce' mode. See bounce
show bouncep
bouncedp
Wejście: none
Wyjście: boolean
Returns true if the turtle has been deflected by the bounds while in bounce mode since last read. See bounce
show bouncedp
boundsp
Wejście: none
Wyjście: boolean
Returns true if the turtle is currently within the bounds area. See bounds, setbounds.
show boundsp
buttonp
Wejście: button (number)
Wyjście: boolean
Returns true if the specified button is pressed. 0 is the left mouse button or joypad button 0, 1 is the right mouse button or joypad button 1, 2 is both buttons, 3 is zoom in and 4 is zoom out.
show buttonp 0
buttonclickedp
Wejście: name (word)
Wyjście: boolean
Returns true if the named button has been clicked since the last time buttonclickedp was read for the given button. See newbutton, buttonclickp
show buttonclickedp "button
buttonclickp
Wejście: name (word)
Wyjście: boolean
Returns true if the named button is currently being clicked. See buttonclickedp, which returns true if the button has been clicked since buttonclickedp was last read.
show buttonclickp "button
buttonnamep
Wejście: name (word)
Wyjście: boolean
Returns true if the named button exists. See newbutton
show buttonnamep "button
buttonpressp
Wejście: none
Wyjście: boolean
Returns true if any button has been pressed since the last time buttonpressp was read.
show buttonpressp
buttonpressedp
Wejście: button (number)
Wyjście: boolean
Returns true if the specified button has been pressed since buttonpressedp was last read for that button. 0 is the left mouse button or joypad button 0, 1 is the right mouse button or joypad button 1, 2 is both buttons, 3 is zoom in and 4 is zoom out.
show buttonpressedp 0
buttonupp
Wejście: button (number)
Wyjście: boolean
Returns true if the specified button has been released since buttonupp was last read. 0 is the left mouse button or joypad button 0, 1 is the right mouse button or joypad button 1, 2 is both buttons, 3 is zoom in and 4 is zoom out.
show buttonupp 0
camcontrolp
Wejście: none
Wyjście: boolean
Returns true if camcontrol is enabled.
show camcontrolp
caseinsensitivep
Wejście: none
Wyjście: boolean
Returns true if nocaseinsensitive is enabled.
show caseinsensitivep
changedp
Wejście: container (word)
Wyjście: boolean
Returns true if the given container has changed since changedp was last read. The first time a container is tested, changedp notes its value and returns false.
show changedp "mycontainer
collisionp
Wejście: turtle (word) | distance (number)
Wyjście: boolean
Returns true if the specified turtle is within the specified distance of the calling turtle. See distance
show collisionp snappy 200
TRUE
consonantp
Wejście: word
Wyjście: boolean
Returns true if the first letter of the supplied word is a consonant. Y is considered a vowel. See vowelp
show consonantp "x
TRUE
containsp
Wejście: word number or list | list
Wyjście: boolean
Returns true if the specified word or number exists as an item in the specified list. See contains
show containsp "frog [pig duck frog]
true
show containsp 1 [1 2 3 4 5]
databasep
Wejście: databasename (word)
Wyjście: boolean
Returns true if the given databasename is a defined database. See newdatabase
show databasep "mydb
debugp
Wejście: none
Wyjście: boolean
Returns true if debug is enabled.
show debugp
definedp
Wejście: procedurename (word)
Wyjście: boolean
Returns TRUE if the provided procedurename is the name of a defined procedure.
show definedp "myprocedure
TRUE
dictionaryp
Wejście: dictionary (word)
Wyjście: boolean
Returns true if the specified dictionary is currently defined. See dictionary, newdictionary
show dictionaryp "mydict
divisorp
Także: divp
Wejście: numerator (number) | denominator (number)
Wyjście: boolean
returns true of the numerator divides evenly into the denominator. See remainder,
show divisorp 5 20
true
dotp
Wejście: [x y (z)] (list)
Wyjście: none
Returns true if there is a dot at the specified co-ordinates. Dots are turtle-specific, and so dotp will only detect the calling turtle's dots.
show dotp [10 20 30]
dragselectp
Wejście: none
Wyjście: boolean
Returns true if dragselect is enabled
dribblep
Wejście: none
Wyjście: boolean
Returns true if turtleSpaces is currently dribbling. See dribble
elevationsnapp
Wejście: none
Wyjście: boolean
Returns true if the calling turtle has elevationsnap enabled.
show elevationsnapp
eofp
Wejście: none
Wyjście: boolean
Returns true if the current reader is at the end of the file. See reader, writer
show eofp
equalp
Wejście: expression | expression
Wyjście: boolean
Returns true if both supplied expressions are equal
show equalp 5 5
TRUE
show equalp 3 5
FALSE
escapep
Wejście: none
Wyjście: boolean
Returns true if escape is enabled
show escape
evenp
Wejście: number
Wyjście: boolean
Returns true if the provided number is even (0, 2, 4, 6…)
show evenp 6
false
Wejście: none
Wyjście: zero
Returns zero (false).
show false
fencep
Wejście: none
Wyjście: boolean
Returns true if the calling turtle is in fence mode. See fence
show fencep
filep
Wejście: word
Wyjście: boolean
Returns true if the file specified by the given word exists.
show filep "myfile
fluidp
Wejście: none
Wyjście: boolean
Returns true if fluid is enabled in the calling turtle
show fluidp
followp
Wejście: none
Wyjście: boolean
Returns true if the calling turtle is following another turtle
show followp
frozenp
Wejście: word
Wyjście: boolean
Returns true if a frozen track with the name of the given word exists.
show frozenp "myfrozentrack
gamebuttonp
Wejście: button
Wyjście: boolean
Returns true if the specified gamepad button is currently pressed. To read a second controller see selectgamepad, gamepad.
show gamebuttonp 0
gradientp
Wejście: none
Wyjście: boolean
Returns true if gradient is enabled
show gradientp
greaterequalp
Wejście: expression | expression
Wyjście: boolean
Returns true if the first expression is greater than or equal to the second expression.
show greaterequalp 5 3
TRUE
show greaterequalp 3 3
TRUE
greaterp
Wejście: expression | expression
Wyjście: boolean
Returns true if the first expression is greater than the second expression.
show greaterp 5 3
TRUE
show greaterp 3 5
FALSE
hatchlingp
Wejście: turtlename (word)
Wyjście: boolean
Returns true if the given turtlename is a hatchling.
show hatchlingp "seymour
FALSE
hitboundsp
Wejście: number
Wyjście: boolean
Returns true if the calling turtle has hit the specified bounds 'side' since hitboundsp was last read. Note that these 'sides' are relative to the default camera position, the names in () represent the parameters provided to setbounds:
1 = left (x1)
2 = right (x2)
3 = bottom (y1)
4 = top (y2)
5 = far (z1)
6 = near (z2)
show hitbounds 3
false
imagep
Wejście: imagename (word)
Wyjście: boolean
Returns true if the specified imagename is defined.
show imagep "image
insidep
Wejście: [x y z] [[x1 y1 z1] [x2 y2 z2]]
Wyjście: boolean
Returns true if the first set of three-dimensional co-ordinates is within the cube created between the second and third sets of coordinates.
show insidep [0 0 0] [[-10 -10 -10] [10 10 10]]
true
keydownp
Wejście: character (word) or ASCII (number) OR [a b c…] (list)
Wyjście: boolean
Returns true if the given key (or a key in the given list) is currently pressed. See also keypressedp, which returns true if the key has been pressed since the last time it was pressed, and keyupp which returns true if the key has been released since last read.
show keydownp ASCII 13
TRUE
keyp
Wejście: none
Wyjście: boolean
Returns true if there are currently any keys in the keyboard buffer. Often seen with readchar, which will wait for a keypress if there are no keys in the buffer, to mitigate that behaviour. See readchar
show keyp
keypressedp
Także: kpp
Wejście: character (word) or ASCII (number) OR [a b c…] (list)
Wyjście: boolean
Returns true if the supplied key (or one from supplied list) has been pressed since the last time keypressedp checked if that key had been pressed. Note that because keypressedp can take either a character or an ASCII number as input, to read a number directly it must be supplied as a word eg (word 5). Note also that if a list of keys is provided (eg [J j]) they must be separated by space(s). Probably the best thing to use for reading keyboard input in the context of games. To check the current state of a particular key use keydownp. See keypress
show keypressedp "a
keyupp
Wejście: character (word) or ASCII (number) OR [a b c…] (list)
Wyjście: boolean
returns true if the given key (or one from the provided list) has been released since keyupp was last read for that key. See keypressedp, keydownp, upchars
show keyupp "a
TRUE
lessequalp
Wejście: expression | expression
Wyjście: boolean
Returns true if the first expression is less than or equal to the second expression.
show lessequalp 3 5
TRUE
show lessequalp 3 3
TRUE
lessp
Wejście: expression | expression
Wyjście: boolean
Returns true if the first expression is less than the second expression.
show lessp 3 5
TRUE
show lessp 5 3
FALSE
listp
Wejście: item
Wyjście: boolean
Returns true if the provided item is a list.
show listp [frog pig]
TRUE
lockelevationp
Wejście: none
Wyjście: boolean
Returns true if the calling turtle has lockelevation enabled.
show lockelevationp
lockmodelp
Wejście: none
Wyjście: boolean
Returns true if lockmodel is set on the calling turtle.
show lockmodelp
phrasep
Wejście: word, phrase or list
Wyjście: boolean
Returns true if the provided input is a long word (a word that contains spaces).
show phrasep |I am a duck|
lockaxisp
Wejście: word ("x or "y)
Wyjście: boolean
Returns true if the given lockaxis is enabled. See lockaxis, nolockaxis
show lockaxisp "x
true
marcop
Wejście: none
Wyjście: boolean
Returns true if the calling turtle has any current marcos attributed to it. If a turtle is expecting a marco, it can simply wait until marcop is true. See marco
show marcop
matchp
Wejście: search pattern (word) | word or list
Wyjście: boolean
Returns true if doing a search of the provided list using the provided search word would return a result. See match
show matchp 10 [10 20 30]
true
memberp
Wejście: word or list
Wyjście: word or list
Returns true if the result of calling member using similar parameters is not empty.
show memberp "duck [pig duck frog]
true
midip
Wejście: none
Wyjście: boolean
Returns true if a MIDI key has been pressed since the last time midip was read. See midiread, mididown and midiup.
show midip
mimicp
Wejście: none
Wyjście: boolean
Returns true if the calling turtle is mimicking another turtle. See mimic
show mimicp
missilep
Wejście: id (word)
Wyjście: boolean
Returns true if a missile of the given id exists / is active. See newmissile
show missilep "id
modelelevationp
Wejście: none
Wyjście: boolean
Returns true if the current turtle model's 'hitbox' (the cubic area occupied by the model relative to the world axis) is lower than the elevation of the terran under that hitbox. Used for detecting collisions with terrain. modelelevationp takes into account setpremodel.
show modelelevationp
if modelelevationp [crash]
mousep
Wejście: none
Wyjście: boolean
mousep returns true if the mouse has moved since mousep was last read.
show mousep
movedp
Wejście: turtle (word)
Wyjście: boolean
Returns true if the given turtle has moved since movedp was last read. The first time movedp is called, it stores the turtle's position and returns false. See rotatedp
show movedp "myrtle
musicp
Wejście: musicname (word)
Wyjście: boolean
Returns true if the specified music name is loaded in memory.
show musicp "mymusic
namep
Wejście: container (word)
Wyjście: boolean
Returns true if the specified container exists.
show namep "container
nandp
Wejście: value (word, number or list) | comparitors (list or list of lists)
Wyjście: boolean
Opposite of andp. Compares a value to a number of other values, either with or without a comparison operator and returns true if all cases are false. If there is no operator, it tests if they are NOT equivalent. See andp, orp
if nandp "duck [pig cow goose] [pr "quack]
if nandp 5 [[< 2][> 10][= 7]] [pr "false]
nearmissilep
Wejście: class (word) | distance (turtle-units)
Wyjście: boolean
Returns true if a missile of the given class exists within the given distance of the calling turtle. See newmissile
show nearmissilep "missile 20
nearobjectp
Wejście: class (word) OR [name class] (list) | distance (number) OR [distance position] (list)
Wyjście: boolean
Returns true if there is an object of the specified class (or name and class) within the provided distance from the calling turtle, or the specified optional position. Note that hidden objects are not detected by nearobjectp. See newobjects, nearobjects
show nearobjectp "balloon 20
nearp
Wejście: distance
Wyjście: boolean
Returns true if there are any (nostealth) turtles in the given distance from the calling turtle.
show nearp 200
TRUE
negativep
Wejście: number
Wyjście: boolean
Returns true if the supplied number is negative
show negativep -6
not
Wejście: boolean
Wyjście: boolean
Reverses an input boolean, an expression that resolves to either true or false
print not 5 = 4
TRUE
notesp
Wejście: none
Wyjście: boolean
Returns true if the playnotes primitive is currently playing.
show notesp
numberp
Wejście: word
Wyjście: boolean
Returns true if the supplied input is a number.
show numberp 15
TRUE
show numberp "dog
FALSE
objectclassp
Wejście: class (word)
Wyjście: boolean
Returns true if the class of the specified name exists.
show objectclassp "class
objectp
Wejście: name (word) | class (word)
Wyjście: boolean
Returns true if the object of the specfied name and class exists.
show objectp "name "class
oddp
Wejście: number
Wyjście: boolean
Returns true if the provided number is odd (1, 3, 5, 7…)
show oddp 6
onp
Wejście: name (word)
Wyjście: boolean
Returns true if a trigger of the given name is defined in the calling turtle. See on
show onp "trigger
TRUE
orp
Wejście: value (word, number or list) | comparitors (list or list of lists)
Wyjście: boolean
Compares a value to a number of other values, either with or without a comparison operator. If any case is true, orp returns true. If there is no operator, it tests if they are equivalent. See nandp, orp
if orp "duck [duck duck goose] [pr "quack]
if orp 5 [[> 2][< 10][!= 5]] [pr "true]
overlayp
Wejście: name (word)
Wyjście: boolean
Returns true if the specified overlay exists. See newoverlay
show overlayp "overlay
paddlep
Także: mousep
Wejście: none
Wyjście: boolean
Returns true if the mouse / paddle axis values have changed since last read.
show paddlep
paperp
Wejście: none
Wyjście: boolean
Returns true if paper mode is enabled. See paper
show paperp
pencapsp
Wejście: none
Wyjście: boolean
Returns true if pencaps are enabled, see pencaps, nopencaps
show pencapsp
penjoinsp
Wejście: none
Wyjście: boolean
Returns true if penjoins is enabled. See penjoins, nopenjoins
show penjoinsp
penp
Wejście: none
Wyjście: boolean
Returns true if the pen is down, false if the pen is up. See pen
show penp
playmusicp
Wejście: none
Wyjście: boolean
Returns true if music is currently playing.
show playmusicp
plotp
Wejście: plotname (word)
Wyjście: boolean
Returns true if the specified plot exists. See plot
show plotp "plot
primitivep
Wejście: name (word)
Wyjście: boolean
Returns true if the supplied word is the name of a built-in primitive. See listprimitives, primitives
show primitivep "forward
show primitivep "mycommand
procp
Wejście: name (word)
Wyjście: boolean
Returns true if the calling turtle has a procedure with the provided name.
show procp "procedure
randomp
Wejście: number (x) OR list [x y]
Wyjście: boolean
A boolean form of random, randomp is 1-based and returns true if 1 = RANDOM x where x is the provided number of 1 or more, or if y > RANDOM x, if an xy list is provided. Typically used to trigger random events. randomp 0 or 1 always returns true. See random
if randomp 5 [do this stuff...]
renderp
Wejście: none
Wyjście: boolean
Returns true if rendering is enabled. See render.
rotatedp
Wejście: turtle (word)
Wyjście: boolean
Returns true if the given turtle has rotated since rotatedp was last read. The first time rotatedp is called, it stores the turtle's rotation and returns false. See movedp
show rotatedp "myrtle
searchp
Wejście: searchmask (word) | list
Wyjście: boolean
Returns true if the specified search would return a result. See search
show searchp "pig [pig frog duck]
TRUE
sharep
Wejście: "sharename
Wyjście: boolean
Returns true if the specified "sharename exists.
show sharep "sharename
shownp
Wejście: none
Wyjście: boolean
Returns true if the turtle is not hidden, false if it is.
show shownp
TRUE
sleepoverp
Wejście: nonbe
Wyjście: boolean
Returns true if the time taken between occurrences of a sleep command provided with a single-item list parameter, eg sleep [50] has exceeded that provided value. See sleepover
show sleepoverp
soundp
Wejście: soundname (word)
Wyjście: boolean
Returns true if the specified sound is loaded in memory.
show soundp "mysound
spacep
Wejście: word
Wyjście: boolean
Returns true if the specified space is defined.
show spacep "home
true
specklep
Wejście: none
Wyjście: boolean
Returns true if speckle is enabled. See speckle
show specklep
stealthp
Wejście: none
Wyjście: boolean
Returns true if the calling turtle is in stealth. See stealth, nostealth
show stealthp
stickerp
Wejście: name (word)
Wyjście: boolean
Returns true if the specified sticker is defined. See newsticker
show stickerp "marqueesticker
stlbackingp
Wejście: none
Wyjście: boolean
Returns true if stlbacking is enabled, otherwise false. See stlbacking, nostlbacking
show stlbackingp
suspendp
Wejście: workerid
Wyjście: boolean
Returns true if the specified worker is suspended. See suspend, resume
show suspendp 12
syncp
Wejście: none
Wyjście: boolean
Returns true if the calling turtle's 'family' currently has an active sync. See sync
if syncp [sync]
tablep
Wejście: name (word)
Wyjście: boolean
Returns true if the named table is defined.
show tablep "mytable
tagp
Wejście: tagname (word)
Wyjście: boolean
Returns true if the provided tag name is presently defined. See tag
show tagp "tag
tagshownp
Wejście: tagname (word)
Wyjście: boolean
Returns true if the tag with the provided tagname is currently visible (shown). See tag
show tagshownp "tag
tandemp
Wejście: none
Wyjście: boolean
Returns true if the calling turtle is tandeming another turtle. See tandem
show tandemp
targetp
Wejście: none
Wyjście: boolean
Returns true if the calling turtle is targeting another turtle. See target
show targetp
tetherp
Wejście: none
Wyjście: boolean
Returns true if the calling turtle is tethering. See tether
show tetherp
trackp
Wejście: none
Wyjście: boolean
Returns true if the calling turtle's track is being generated / recorded. See track, notrack.
show trackp
trackrenderp
Wejście: none
Wyjście: boolean
Returns true if the calling turtle's track is being rendered.
show trackrenderp
transcriptp
Wejście: none
Wyjście: boolean
Returns true if transcript is enabled. See transcript, notranscript
true
Wejście: none
Wyjście: true
Returns true. See false
show true
turtlep
Wejście: turtle (word)
Wyjście: boolean
Returns true if the named turtle exists.
show turtlep "myrtle
typefilledp
Wejście: none
Wyjście: boolean
Returns true if typefilled is set on. See settypefilled
show typefilledp
typelinedp
Wejście: none
Wyjście: boolean
Returns true if typelined is set on. See settypelined
show typelinedp
updatestampsp
Wejście: none
Wyjście: boolean
Returns the state of updatestamps
show updatestampsp
userp
Wejście: name (word)
Wyjście: boolean
Returns true if the provided name is a currently defined user.
show userp "Bonnie
true
viewturtlep
Wejście: name (word)
Wyjście: boolean
Returns true if the named turtle is currently the view turtle.
show viewturtlep "snappy
true
visiblep
Wejście: none
Wyjście: boolean
Returns true if the calling turtle is in view of the current view turtle
show visiblep
vowelp
Wejście: character
Wyjście: boolean
Returns true if the provided character is a vowel (a e i o u or y)
show vowelp "u
windowp
Wejście: none
Wyjście: boolean
Returns true if the turtle is currently in 'window' mode. See window
show windowp
withinp
Wejście: number or list | number or list | number of list
Wyjście: boolean
Compares two lists or numbers, returns true if they are within the variance specified by the third list of container. All three lists need to have the same number of parameters. Used mainly for comparing position / proximity of turtles.
show withinp [10 10 10] [15 15 15] [10 10 10]
true
show withinp 5 8 2
false
wrapp
Wejście: none
Wyjście: boolean
Returns true if the turtle is currently in 'wrap' mode. See wrap, window, fence
show wrapp
wrappedp
Wejście: none
Wyjście: boolean
Returns true if the turtle has wrapped, the act of reading it makes it false (if true). See wrap, window
show wrappedp
wordp
Wejście: none
Wyjście: boolean
Returns true if the input is a word.
show wordp "word
zerop
Wejście: number
Wyjście: boolean
Returns true if the provided number is zero.
show zerop 5
FALSE
show zerop 0
TRUE
affixp
Wejście: none
Wyjście: boolean
Returns true if the calling turtle is affixed. See affix
show affixp
angularvelocityp
Wejście: none
Wyjście: boolean
Returns true if the turtle has angular velocity (physical rotation)
show velocityp
blockedp
Wejście: none
Wyjście: boolean
Returns true if the calling turtle has been 'blocked' or impeded by the blockmap since blockedp was last read.
show blockedp
blockmapp
Wejście: none
Wyjście: boolean
Returns true if the turtle is in blockmap mode, that is, it can be blocked by the blockmap. See blockmap
show blockmapp
blockmissilep
Wejście: class
Wyjście: boolean
Returns true if missiles of the specified class have contacted the blockmap since last read
show blockmissilep
blockp
Wejście: none
Wyjście: boolean
Returns true if calling turtle's model is currently contacting the blockmap. Use blockedp if you wish to check if the model has contacted the blockmap previously. See blockmap
show blockp
true
blockposp
Wejście: position
Wyjście: boolean
Returns true if the blockmap exists at the given position.
show blocktestp [10 40]
blocktestp
Wejście: heading (degrees) | distance
Wyjście: boolean
Returns true if the blockmap exists the given distance in the given direction from the turtle's position.
show blocktestp 180 10
collidedp
Wejście: none
Wyjście: boolean
Returns true if a physical turtle has intersected with another turtle since collidedp was last read. See collidedwith which returns a list of turtles that have collided with the calling turtle. Note that for efficiency, collidedp / collidedwith are not active until after one of them is called by the turtle.
show collidedp
deflectedp
Wejście: none
Wyjście: boolean
Returns true if the calling turtle has been deflected by (or has deflected) another turtle since last read. Use blockedp to detect if the calling turtle has or has been deflected by the blockmap. See deflectedby, which returns the name(s) of the turtles that have deflected (or been deflected by) the calling turtle
show deflectedp
forcesp
Wejście: none
Wyjście: boolean
Returns true if any forces are set. See forces
show forcesp
gravityp
Wejście: none
Wyjście: boolean
Returns true if the calling turtle has gravity set on. See gravity
show gravityp
hitmissilep
Wejście: class OR [class1 class2…]
Wyjście: boolean
Returns true if the calling turtle has been contacted by any missiles of the given class(es) since hitmissilep was last read. If an empty list is provided, hitmissilep tests against all missile classes. See hitmissiles to see the names of contacting missiles.
show hitmissilep
hitobjectp
Wejście: class
Wyjście: boolean
Returns true if the calling turtle has collided with objects of the given class since last read. See hitobjects, which returns the names of the objects collided with.
show hitobjectp
hitp
Wejście: none
Wyjście: boolean
Returns true if the calling turtle is CURRENTLY contacting another physical, mechanical or elastic turtle. See hitby, which returns the name(s) of the turtle(s).
show hitp
hitposp
Wejście: position
Wyjście: boolean
Returns true if physics bodies (hulls) of turtles other than the calling turtle currently overlap the given location. hittest returns the namees of those turtles. See hitp, blocktestp
show hitposp [40 30]
hittestp
Wejście: heading distance
Wyjście: boolean
Returns true if physics bodies (hulls) of turtles other than the calling turtle currently overlap the given location. hittest returns the namees of those turtles. See hitp, blocktestp
show hittestp 90 20
myforcesp
Wejście: none
Wyjście: boolean
Returns true if myforces is set. See myforces
show myforcesp
reorientp
Wejście: none
Wyjście: boolean
Returns true if the calling turtle has reorient set.
show reorientp
scenep
Wejście: name (word)
Wyjście: boolean
Returns true if there is an active scene with the given name. See scenes, selectscene
show scenep "scene
torquep
Wejście: none
Wyjście: boolean
Returns true if torque is enabled on the calling turtle.
show torquep
velocityp
Wejście: none
Wyjście: boolean
Returns true if the turtle has velocity (physical movement)
show velocityp
animationp
Wejście: "model "animation
Wyjście: true/false
Returns TRUE if the specified model has the given animation, FALSE otherwise.
if animationp "bernie "walk [fireanimation "walk 100]
animationsp
Wejście: "model
Wyjście: true/false
Returns TRUE if the specified model has any animations, FALSE otherwise.
if animationsp "bernie [print [This model has animations!]]
animatep
Wejście: none
Wyjście: true/false
Returns TRUE if the turtle is currently playing an animation, FALSE otherwise.
if animatep [print [Animation is playing]]
meshp
Wejście: "model "meshname
Wyjście: true/false
Returns TRUE if the specified model contains the given mesh, FALSE otherwise.
if meshp "bernie "head [print [Model has head mesh]]
xor
Także: eor
Wejście: a b
Wyjście: boolean
Returns TRUE if exactly one of the two inputs is true, FALSE if both are true or both are false. This is the boolean exclusive or operation.
show xor true false
TRUE
show xor true true
FALSE
show xor false false
FALSE
show eor 1 > 0 2 > 3
TRUE