Posted 14 May 2014 - 06:53 PM
How do I make the turtle run functions a and b run separately?
I want it to place the lamp and if I restart the turtle to make it mine the lamp even if it didn't place it in that session.
I want it to place the lamp and if I restart the turtle to make it mine the lamp even if it didn't place it in that session.
function a()
while true do
os.pullEvent("redstone")
if rs.getInput("back") == true
then
turtle.digUp()
turtle.up()
turtle.select(1)
turtle.placeUp()
turtle.down()
turtle.select(2)
turtle.placeUp()
end
end
end
function b()
while true do
os.pullEvent("redstone")
if rs.getInput("front") == true
then
turtle.select(2)
turtle.digUp()
turtle.up()
turtle.select(1)
turtle.digUp()
turtle.down()
turtle.select(2)
turtle.placeUp()
turtle.select(1)
end
end
end
while true do
a()
b()
end