turtle.turnRight

From ComputerCraft
Jump to: navigation, search

turtle.turnRight
Function
Syntax
turtle.turnRight()
Returns boolean success
API turtle
Source CC:Tweaked (source)

When called, tries to rotate the turtle 90 degrees to the right. Note that performing this action does not require fuel, and the turtle can not be obstructed or denied from rotating.

ExampleExampleRotating a turtle
Rotates a turtle 360 degrees clockwise, which equals to 4 steps of 90 degrees to the right, to end facing in the same direction as it started.
Code
for step = 1, 4 do
  turtle.turnRight()
end