This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Paper_Beemo's profile picture

Why does this not move?

Started by Paper_Beemo, 15 April 2015 - 04:09 PM
Paper_Beemo #1
Posted 15 April 2015 - 06:09 PM

function Dig()
for i = 1,25 do
turtle.forward()
turtle.dig()
turtle.digUp()
end
turtle.turnRight()
turtle.turnRight()
for i = 1,25 do
turtle.forward()
end
end
for xxx = 1,2 do 
Dig()
turtle.turnRight() turtle.forward()  turtle.turnLeft()
end

I have that code however the turtle doesn't move. It just randomly rotates.
Lyqyd #2
Posted 15 April 2015 - 07:34 PM
Have you fueled the turtle?
Square789 #3
Posted 15 April 2015 - 07:44 PM
The code should work fine. So, as Lyqyd said, you probably have to fuel the turtle.

You can do this by
  • Putting a bucket of lava, coal, wood or anything you can fire a oven with (i think) into the selected slot of the turtle (you recognize this slot by a border around it)
  • Entering the Lua command prompt by entering "lua"
  • Typing "turtle.refuel()"
  • Typing "exit()"
Then run your program again
Lignum #4
Posted 15 April 2015 - 08:37 PM
You can do this by
  • Putting a bucket of lava, coal, wood or anything you can fire a oven with (i think) into the selected slot of the turtle (you recognize this slot by a border around it)
  • Entering the Lua command prompt by entering "lua"
  • Typing "turtle.refuel()"
  • Typing "exit()"

There's an in-built program for this exact purpose. Type "refuel all" and the turtle will consume all the fuel in its inventory.
Paper_Beemo #5
Posted 16 April 2015 - 05:09 PM
wow, I totally forgot. I forget to label it before I dug it up so the fuel must of gone. Thanks guys