Posted 28 September 2012 - 07:01 AM
I should preface this by saying I have absolutely no business playing with computercraft. I am not a programmer and never will be, I just happened into CC after I got tired of vanilla MC and fell into IC2 and BC, and figured I should try some others. So for all intents and purposes I am a complete noob to this, and should be treated as such.
I've began toying with turtles and my first project has been to create an automatic wheat farmer. This is what I have so far:
turtle.select(1)
turtle.refuel(1)
print(turtle.getFuelLevel())
turtle.dig()
turtle.suck()
turtle.forward()
for i=1,7 do
turtle.dig()
turtle.suck()
turtle.forward()
turtle.turnLeft()
turtle.turnLeft()
turtle.dig()
turtle.select(2)
turtle.place()
turtle.turnLeft()
turtle.turnLeft()
end
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.turnLeft()
So it farms 7 blocks in front of it and then turns and moves to the next row over, I know it's not complete but I don't want to go any further until I know some more.
My first question is, is there a way to "name" the looped set so that I can just have the turtle do it again (with "do" I would assume)? Or by some other method?
My second question: is there a way to activate a turtle program with a redstone signal? Or do I have to manually do it through startup/running the program?
I've attempted to google the answers to these questions but have been unsuccessful.
Also, any pointers would be nice, I'm pretty much self taught so I'm sure I'm doing several things either wrong or inefficently.
Thanks for any assistance.
I've began toying with turtles and my first project has been to create an automatic wheat farmer. This is what I have so far:
Spoiler
–Farm–turtle.select(1)
turtle.refuel(1)
print(turtle.getFuelLevel())
turtle.dig()
turtle.suck()
turtle.forward()
for i=1,7 do
turtle.dig()
turtle.suck()
turtle.forward()
turtle.turnLeft()
turtle.turnLeft()
turtle.dig()
turtle.select(2)
turtle.place()
turtle.turnLeft()
turtle.turnLeft()
end
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.turnLeft()
So it farms 7 blocks in front of it and then turns and moves to the next row over, I know it's not complete but I don't want to go any further until I know some more.
My first question is, is there a way to "name" the looped set so that I can just have the turtle do it again (with "do" I would assume)? Or by some other method?
My second question: is there a way to activate a turtle program with a redstone signal? Or do I have to manually do it through startup/running the program?
I've attempted to google the answers to these questions but have been unsuccessful.
Also, any pointers would be nice, I'm pretty much self taught so I'm sure I'm doing several things either wrong or inefficently.
Thanks for any assistance.