Difference between revisions of "Turtle.detect"
From ComputerCraft Wiki
Line 9: | Line 9: | ||
|examples= | |examples= | ||
{{Example | {{Example | ||
− | |desc=Detects if there is a Block in front. | + | |desc=Detects if there is a Block in front and digs it out. |
− | |code=turtle.detect() | + | |code= if turtle.detect() then <br> turtle.dig() <br>end |
}} | }} | ||
}} | }} |
Revision as of 12:53, 4 May 2012
Function turtle.detect | |
Detects if there is a Block in front. | |
Syntax | turtle.detect() |
Returns | boolean If turtle has Detected a Block in front. |
Part of | ComputerCraft |
API | turtle |
Examples
Example | |
Detects if there is a Block in front and digs it out. | |
Code |
if turtle.detect() then |