16 posts
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.
146 posts
Location
the Netherlands
Posted 17 May 2012 - 10:05 PM
Wall builder code:
Spoiler
use 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!")
16 posts
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.