Difference between revisions of "Turtle.detectDown"

From ComputerCraft Wiki
Jump to: navigation, search
(Expanded the existing example)
(Adding "see also".)
 
(One intermediate revision by one other user not shown)
Line 4: Line 4:
 
|args=
 
|args=
 
|api=turtle
 
|api=turtle
|returns={{type|boolean}} If turtle has Detected a Block Below.
+
|returns={{type|boolean}} If turtle has detected a block below.
 
|addon=ComputerCraft
 
|addon=ComputerCraft
 
|desc=Detects if there is a Block Below.
 
|desc=Detects if there is a Block Below.
Line 18: Line 18:
 
}}
 
}}
 
}}
 
}}
 +
 +
==See also==
 +
*[[turtle.detect]]
 +
*[[turtle.detectUp]]
  
 
[[Category:Lua_Core_Functions]]
 
[[Category:Lua_Core_Functions]]

Latest revision as of 17:59, 22 April 2015


Grid Redstone.png  Function turtle.detectDown
Detects if there is a Block Below.
Syntax turtle.detectDown()
Returns boolean If turtle has detected a block below.
Part of ComputerCraft
API turtle

Examples

Grid paper.png  Example
Displays whether or not there is a block under the turtle.
Code
if turtle.detectDown() then
  print("There is a block under me!")
else
  print("There isn't a block under me!")
end
Output A message on the turtle screen telling if a block is under the turtle.


See also