turtle.forward

From ComputerCraft Wiki
Revision as of 04:33, 13 March 2012 by Uncreative Name (Talk | contribs) (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...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


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
print(turtle.forward())
Output true if the turtle could move forwards, false if there was something in the way