Difference between revisions of "Turtle.forward"

From ComputerCraft Wiki
Jump to: navigation, search
(Created page with "{{lowercase}} {{Function |name=turtle.forward |args= |api=turtle |returns=boolean whether the turtle succeeded in moving forwards |addon=ComputerCraft |desc=Attempts to mo...")
 
m
Line 10: Line 10:
 
{{Example
 
{{Example
 
|desc=Moves the turtle forward
 
|desc=Moves the turtle forward
|code=print(turtle.forward())
+
|code=turtle.forward()
 
|output=true if the turtle could move forwards, false if there was something in the way
 
|output=true if the turtle could move forwards, false if there was something in the way
 
}}
 
}}
 
}}
 
}}

Revision as of 21:22, 15 March 2012


Grid Redstone.png  Function turtle.forward
Attempts to move the turtle forward.
Syntax turtle.forward()
Returns boolean whether the turtle succeeded in moving forwards
Part of ComputerCraft
API turtle

Examples

Grid paper.png  Example
Moves the turtle forward
Code
turtle.forward()
Output true if the turtle could move forwards, false if there was something in the way