Posted 12 March 2012 - 05:11 AM
Hey everyone,
Added a few more tiny scripts now. The first one is a parallel (that is, four turtles building simultaneously) wall-building script, to serve as the basis for a house. It only builds the walls at the moment, because I haven't figured out how to write a multi-bot roof building script without having to manually pick up the turtles and move them to the right place at the top of the walls, and I know most of you probably aren't interested in doing that. Maybe someone who is better at this than me, can figure out how to do that, if you want to use this as the basis of something else.
For this you'll need five wireless mining turtles (the four builders, and a fifth to activate the script on the other four via rednet) and half a stack (32 blocks, or actually 24 to be exact) of building material (I just use cobble, but I know most people like wood) per turtle.
Because the walls are six blocks in length, I manually place the first turtle on the first block where the house will be built, and then each turtle on the sixth block, each facing 90 degrees away from each other. So the first turtle faces forward. The second turtle faces right, and is on the sixth block forward from the first turtle. The third turtle faces backwards, and is on the sixth block to the right of the second turtle. The fourth turtle faces left, and is on the sixth block to the right of the first turtle. The fifth turtle can be placed anywhere, as long as it is within 50 blocks of the four builders, and doesn't get in the way. Buildwall is run on the four turtles which sets them listening, when you put the cobble in their inventories, and rednet-send is run on the fifth turtle, in order to get them all building.
Here's the script:-
buildwall:-
rednet-send:-
I'm aware that this is very rough, but one advantage is that once you get the hang of the placement, it's fast. The end result is the basis for a 4x4 (internal) structure, and adding the roof manually yourself is quick as well. I know there are other house builders out there which are complete, but I haven't seen any others yet that use more than one turtle, either. If you have a lot of wireless mining turtles, you could also build several of these simultaneously, and potentially give yourself an entire (large) base in under 15 minutes or so.
Added a few more tiny scripts now. The first one is a parallel (that is, four turtles building simultaneously) wall-building script, to serve as the basis for a house. It only builds the walls at the moment, because I haven't figured out how to write a multi-bot roof building script without having to manually pick up the turtles and move them to the right place at the top of the walls, and I know most of you probably aren't interested in doing that. Maybe someone who is better at this than me, can figure out how to do that, if you want to use this as the basis of something else.
For this you'll need five wireless mining turtles (the four builders, and a fifth to activate the script on the other four via rednet) and half a stack (32 blocks, or actually 24 to be exact) of building material (I just use cobble, but I know most people like wood) per turtle.
Because the walls are six blocks in length, I manually place the first turtle on the first block where the house will be built, and then each turtle on the sixth block, each facing 90 degrees away from each other. So the first turtle faces forward. The second turtle faces right, and is on the sixth block forward from the first turtle. The third turtle faces backwards, and is on the sixth block to the right of the second turtle. The fourth turtle faces left, and is on the sixth block to the right of the first turtle. The fifth turtle can be placed anywhere, as long as it is within 50 blocks of the four builders, and doesn't get in the way. Buildwall is run on the four turtles which sets them listening, when you put the cobble in their inventories, and rednet-send is run on the fifth turtle, in order to get them all building.
Here's the script:-
buildwall:-
function tworows()
turtle.up()
for i=1,5 do
turtle.placeDown()
turtle.forward()
end
turtle.placeDown()
turtle.up()
turtle.placeDown()
for i=1,5 do
turtle.back()
turtle.placeDown()
end
end
function wall()
for i=1,2 do
tworows()
end
end
rednet.open("right")
id, message = rednet.receive()
print ("Computer ".. id .. " has sent us a message")
print ("The message is")
print (message)
wall()
rednet-send:-
rednet.open("right")
rednet.broadcast("hello")
I'm aware that this is very rough, but one advantage is that once you get the hang of the placement, it's fast. The end result is the basis for a 4x4 (internal) structure, and adding the roof manually yourself is quick as well. I know there are other house builders out there which are complete, but I haven't seen any others yet that use more than one turtle, either. If you have a lot of wireless mining turtles, you could also build several of these simultaneously, and potentially give yourself an entire (large) base in under 15 minutes or so.