turtle.detectDown
When called, will return true if the block below the turtle is anything that is not air or liquid.
  | 
  |||
| Detect if there is a block below the turtle. | |||
| Code | local result = turtle.detectDown()
if result then
  print("There is a block below the turtle!")
else
  print("There is no block below the turtle, only air or a liquid.")
end
 | 
    ||
| Output | There is a block below the turtle!
 | 
    ||
Functions  | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Lua | 
  | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CC:Tweaked | 
  | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| turtle.detectDown Function  | |
|---|---|
| 
Syntax turtle.detectDown()  | |
| Returns | boolean result | 
| API | turtle | 
| Source | CC:Tweaked (source) | 
    This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.