Jump to content




Help with laying program


  • You cannot reply to this topic
8 replies to this topic

#1 drdoom30

  • New Members
  • 7 posts

Posted 05 August 2012 - 07: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.

#2 Xhisor

  • New Members
  • 37 posts
  • LocationSweden

Posted 05 August 2012 - 07: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


#3 drdoom30

  • New Members
  • 7 posts

Posted 05 August 2012 - 07:45 PM

The same thing happens it just places one pipe and just sits there. It doesn't go up or anything.

#4 drdoom30

  • New Members
  • 7 posts

Posted 05 August 2012 - 07: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.

#5 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 05 August 2012 - 08: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.

#6 drdoom30

  • New Members
  • 7 posts

Posted 05 August 2012 - 08:04 PM

Fail I didn't know you had to fuel them haha.

View PostMysticT, on 05 August 2012 - 08:03 PM, said:

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.

#7 DaNoobz

  • New Members
  • 1 posts

Posted 05 August 2012 - 09: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.

#8 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 06 August 2012 - 01:48 AM

what are you trying to do? make it create a 'tower' of pipes, or a 'line' of pipes?

#9 Noodle

  • Members
  • 989 posts
  • LocationSometime.

Posted 06 August 2012 - 10:57 AM

Why are you placing then running into it?
turtle.placeDown()





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users