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

My mining turtle won't behave...

Started by Apfeldstrudel, 21 May 2013 - 09:34 AM
Apfeldstrudel #1
Posted 21 May 2013 - 11:34 AM
SOLVED

Hello!
I have made a mining turtle, it worked fine a while ago and i just recently did the bad move not to test it before deleting my old pastebin…
What it does wrong is never stop mining down…
Here is the pastebin: pastebin.com/DjH8MX9Q

Thank you!
The_Awe35 #2
Posted 21 May 2013 - 02:29 PM
In your function digdown(), you tell it to dig and go down if it detects beneath it. I don't know if you want it at bedrock or at a select spot. It is easy enough to do both with something like this:


height = tonumber(read())

--rest of code

local function digDown()
  for i=1,height do
    if not turtle.digDown() then --if it hits something it can't dig, like bedrock
    break
    end 
  turtle.down()
  end
end
Apfeldstrudel #3
Posted 21 May 2013 - 03:35 PM
GOt it working now anyways- any way to close topic?