Difference between revisions of "Turtle.detect"

From ComputerCraft Wiki
Jump to: navigation, search
(Created page with "{{lowercase}} {{Function |name=turtle.detect |args= |api=turtle |addon=ComputerCraft |desc=Detects if there is a Block in front |examples= {{Example |desc=Detects if there is...")
 
Line 4: Line 4:
 
|args=
 
|args=
 
|api=turtle
 
|api=turtle
 +
|returns=[[int]] If turtle has Detected a Block in front.
 
|addon=ComputerCraft
 
|addon=ComputerCraft
|desc=Detects if there is a Block in front  
+
|desc=Detects if there is a Block in front.
 
|examples=
 
|examples=
 
{{Example
 
{{Example
|desc=Detects if there is a Block in front  
+
|desc=Detects if there is a Block in front.
 
|code=print(turtle.detect())
 
|code=print(turtle.detect())
 
}}
 
}}
 
}}
 
}}

Revision as of 21:08, 15 March 2012


Grid Redstone.png  Function turtle.detect
Detects if there is a Block in front.
Syntax turtle.detect()
Returns int If turtle has Detected a Block in front.
Part of ComputerCraft
API turtle

Examples

Grid paper.png  Example
Detects if there is a Block in front.
Code
print(turtle.detect())