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

Help!

Started by ThatCreepyUncle, 12 February 2015 - 09:56 PM
ThatCreepyUncle #1
Posted 12 February 2015 - 10:56 PM
Im a noob:

My program:

turtle.dig(18)
[Tab]end



I didn't put tab but computer won't let me put tab on this website

can someone give me a simple program for a turtle to dig forward like a strip mine! HELP!
CCGrimHaxor #2
Posted 13 February 2015 - 11:08 AM
ok the first thing is that turtle.dig takes no arguments that means you can only do: turtle.dig()
if you want to strip mine then you can use a for loop
Second tabs don't matter

Ex.:
local blocks = 18 – How many blocks to dig down
for i = 1, blocks do – this will increase the i for 1 every time the code inside the for loop executes and will do this until i = blocks(18)
turtle.digDown() – Dig 1 block down
turtle.down() – go 1 block down
end – end the for loop
Bomb Bloke #3
Posted 13 February 2015 - 11:17 AM
Commands to make the turtle dig out the block in front of itself, while also moving into position to dig out the next one, would enhance that loop somewhat. ;)/>