7 posts
Posted 05 August 2012 - 08:35 PM
turtle.up()
while (true) do
turtle.place(1)
turtle.forward()
turtle.place(1)
turtle.forward()
turtle.place(1)
turtle.forward()
turtle.place(1)
turtle.forward()
turtle.place(1)
turtle.forward()
turtle.place(1)
turtle.forward()
turtle.select(1)
turtle.place(1)
turtle.forward()
turtle.place(1)
turtle.forward()
turtle.place(1)
turtle.forward()
turtle.place(1)
turtle.forward()
turtle.place(1)
turtle.forward()
turtle.place(1)
turtle.forward()
turtle.select(1)
end
The turtle won't go up and will lay the first item and just sit there.
37 posts
Location
Sweden
Posted 05 August 2012 - 08:41 PM
The code should look like this
turtle.up()
while true do
turtle.place()
turtle.forward()
turtle.place()
turtle.forward()
turtle.place()
turtle.forward()
turtle.place()
turtle.forward()
turtle.place()
turtle.forward()
turtle.place()
turtle.forward()
turtle.select(1)
turtle.place()
turtle.forward()
turtle.place()
turtle.forward()
turtle.place()
turtle.forward()
turtle.place()
turtle.forward()
turtle.place()
turtle.forward()
turtle.place()
turtle.forward()
turtle.select(1)
end
7 posts
Posted 05 August 2012 - 08:45 PM
The same thing happens it just places one pipe and just sits there. It doesn't go up or anything.
7 posts
Posted 05 August 2012 - 08:59 PM
The turtle was moving in a previous version just not laying down pipes but when I updated the turtle would only lay 1 pipe and not move.
1604 posts
Posted 05 August 2012 - 09:03 PM
I suppose you use CC 1.4, right? Turtles need fuel in 1.4, so you'll have to add some to it and make some checks and refuel, or disable it on the config.
7 posts
Posted 05 August 2012 - 09:04 PM
Fail I didn't know you had to fuel them haha.
I suppose you use CC 1.4, right? Turtles need fuel in 1.4, so you'll have to add some to it and make some checks and refuel, or disable it on the config.
Thank you.
1 posts
Posted 05 August 2012 - 10:56 PM
After looking at your code it seems that you are trying to make the turtle drive forward instead of going up, therefore it gets stuck on the pipe.
Swap
turtle.forward()
with
turtle.up()
Apart from that you have made the program terribly inefficient and it could easily be cut down to a few lines by adding a extra while loop repeating the
turtle.place(1)
turtle.forward()
how many times you want the height of the pipe to be.
839 posts
Location
England
Posted 06 August 2012 - 02:48 AM
what are you trying to do? make it create a 'tower' of pipes, or a 'line' of pipes?
864 posts
Location
Sometime.
Posted 06 August 2012 - 11:57 AM
Why are you placing then running into it?
turtle.placeDown()