Posted 24 December 2012 - 10:07 AM
Ok so i have a simple house building program but i can't figure out how to get the turtle to switch slots when it runs out in one this is my program so far:
local y = 2
local x = 64
turtle.select(1)
turtle.refuel()
turtle.select(2)
function wallBuild() –This builds the wall
for i = 1,4 do
turtle.up()
turtle.placeDown()
x = x-1
if x = 0 then
turtle.select(y=y+1)
end
end
end
function nextColumn() –This starts the next column of the wall
turtle.forward()
for j= 1,4 do
turtle.down()
end
end
for k = 1,10 do
wallBuild()
nextColumn()
end
local y = 2
local x = 64
turtle.select(1)
turtle.refuel()
turtle.select(2)
function wallBuild() –This builds the wall
for i = 1,4 do
turtle.up()
turtle.placeDown()
x = x-1
if x = 0 then
turtle.select(y=y+1)
end
end
end
function nextColumn() –This starts the next column of the wall
turtle.forward()
for j= 1,4 do
turtle.down()
end
end
for k = 1,10 do
wallBuild()
nextColumn()
end