21 posts
Posted 17 March 2012 - 04:40 PM
hey guys i created a program for the turtle heres what i put in disk/startup
while turtle.detectDown() do
turtle.digDown()
turtle.down()
end
while not turtle.detectDown() do
turtle.up()
end
there is a known glitch, if it dosent hit a cave or liquid, it will go to bedrock and get glitched trying to go down and remove bedrock, but i dont know how to fix that…
21 posts
Posted 18 March 2012 - 02:21 PM
# The digUp() call in bedrockcheck is simply to make sure that the turtle definitely gets to the surface; in case sand has fallen down or something.
# In bedrockcheck, comeup() is called in response to turtle.digDown() responding false, which it will do in the case of bedrock.
# This ended up fairly complicated, so I've split it into multiple functions so that it is readable.
function comeup()
for i=1,59
do
turtle.digUp()
turtle.up()
end
end
function bedrockcheck()
if not turtle.digDown() then
comeup()
break
end
end
function godown()
while turtle.detectDown() do
turtle.digDown()
turtle.down()
end
end
function cavefind()
while not turtle.detectDown() do
comeup()
end
end
godown()
cavefind()
bedrockcheck()
comeup()
21 posts
Posted 08 April 2012 - 09:47 PM
nonono :P/>/> what i mean is you start on surface, and mine down. all i need is that if my turtle dosent hit a cave and hits bedrock to not get stuck down there but strait back up…
3 posts
Posted 14 April 2012 - 10:42 PM
I think he just did that…i'm not sure though.