This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
neto333's profile picture

a little of help :D

Started by neto333, 17 May 2012 - 06:43 PM
neto333 #1
Posted 17 May 2012 - 08:43 PM
Hi, im not good making programs for turtle, so if someone can help me in a program that can make walls like in the preview video, were you can say the diameter, etc.
thank you.
Dirkus7 #2
Posted 17 May 2012 - 10:05 PM
Wall builder code:
Spoileruse it like this:
programname <walllength> <wallheight> <diameter>
please fill enough slots with blocks

args = { ... }
length = args[1] or 1
height = args[2] or 1
diameter = args[3] or 1
print("Wall builder running...")
for l = 1, length do
for f = 1, diameter do
turtle.forward()
end
for p = 1, diameter do
turtle.place()
turtle.back()
end
for h = 2, height do
turtle.up()
for f = 1, diameter do
turtle.forward()
end
for p = 1, diameter do
turtle.place()
turtle.back()
end
end
for d = 2, height do
turtle.down()
end
turtle.turnRight()
turtle.forward()
turtle.turnLeft()
end
print("Wall done!")
neto333 #3
Posted 17 May 2012 - 11:12 PM
thank you, but how i use the program, i write for example 543 but the turtle build a 543 block length wall, i try with space 5 4 3 but is the same, i can put the height.
Now is working correctly, thank you so much.