Posted 11 May 2013 - 12:26 PM
Ok so after watching many videos over programming turtles i decided to attempt to make one. It all works other than the part where i want the turtle to place a torch every 10 blocks.
and that only placed a torch the first time the turtle went 5 blocks but none after that
function layer1()
turtle.dig()
turtle.forward()
turtle.turnRight()
turtle.dig()
turtle.turnLeft()
turtle.turnLeft()
turtle.dig()
turtle.turnRight()
turtle.digUp()
turtle.up()
turtle.turnRight()
turtle.dig()
turtle.turnLeft()
turtle.turnLeft()
turtle.dig()
turtle.turnRight()
turtle.down()
end
function layer2()
turtle.digDown()
turtle.down()
turtle.turnRight()
turtle.dig()
turtle.turnLeft()
turtle.turnLeft()
turtle.dig()
turtle.turnRight()
end
function finish()
layer1()
layer2()
layer2()
turtle.up()
end
local times = 0
term.write("enter number of stairs")
times = read()
for i = 0, times do
finish()
end
this is what i have so far i know there is probably a much easier way to do most of this, but right now i am just trying to find out how to get the turtle to place the torch.
I have already tried
if i==5 then
turtle.placeUp()
end
and that only placed a torch the first time the turtle went 5 blocks but none after that
Edited by