turtle.dig

turtle.dig
Function
Syntax
turtle.dig(
  • toolSide? : string
)

Returns bool didDig
API turtle
Source CC:Tweaked (source)

Breaks the block in front of the turtle.

  • The turtle can only dig when there is a solid or transparent block in front of it, and a pickaxe is equipped.
ExampleCheck for dig
See if it was able to dig.
Code
<nowiki>
local didDig = turtle.dig()
print(didDig)
    </nowiki>
Output
false
1
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.