turtle.forward

From ComputerCraft Wiki
Revision as of 21:22, 15 March 2012 by SgtBurned (Talk | contribs)

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