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

mining program with turtle not moving forward

Started by Toushirou1989, 17 March 2014 - 06:03 AM
Toushirou1989 #1
Posted 17 March 2014 - 07:03 AM
i having an issue with my program where the turtle will just sit in one place instead of moving forward that is stated in the program

i dont know if i am doing something wrong here but i can see any think wrong with my program here.



function DigTunnel(Int)
	torch = 0
	 while Int > 0 do
		 if turtle.detectUp() then
		   turtle.digUp()
		 end
		 if turtle.detectDown() then
			turtle.digDown()
		 end
		  while turtle.detect() do
			turtle.dig()
			 sleep(0.5)
		   end
		   if torch == 8 then
			   turtle.select(2)
			   turtle.placeDown()
			   torch = 0
			end
			   turtle.forward()
			   torch = torch + 1
			   Int = Int - 1
			end
end
DigTunnel(48)
turtle.turnRight()
DigTunnel(3)
turtle.turnRight()
DigTunnel(48)
Lyqyd #2
Posted 17 March 2014 - 07:06 AM
Have you fueled the turtle?
Toushirou1989 #3
Posted 17 March 2014 - 07:21 AM
yes it moves just in one place places a torch down then mines the torch then places it down again.

yes it was the fuel it was in the turtle just was not taking it on its own. no sleep does not help
Lyqyd #4
Posted 17 March 2014 - 02:25 PM
Putting fuel items in the turtle's inventory isn't the same as fueling the turtle. Put the fuel items in the inventory by themselves, then run the refuel program.