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

Turtle won't place torches

Started by stormchaser206, 28 January 2015 - 05:05 PM
stormchaser206 #1
Posted 28 January 2015 - 06:05 PM
I am using Direwolf20's stair program code for turtles (from one of his tutorials). I also tried to modify it to place lights. It does everything it's supposed to (even turn to place it), but it doesn't place the torches. Also, the torches are in slot 15.

Here is the code:

turtle.digDown()
turtle.down()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.digDown()
turtle.down()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.select(15)
turtle.turnRight()
turtle.place()
turtle.turnLeft()
turtle.digDown()
turtle.down()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.digDown()
turtle.down()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.select(15)
turtle.turnRight()
turtle.place()
turtle.turnLeft()
The turtle.place() is where the torch placing is.
InDieTasten #2
Posted 28 January 2015 - 06:20 PM
As far as I can tell you want to place a torch at a position, that is obstructed by a block(the torch cannot be placed "inside" the turtle)
So you can

either add another turtle.dig() in front of each turtle.place(

or replace turtle.place() by turtle.placeUp()

or turn two times to the left, place, and two times to the right ;)/>

btw: they call them loops. if you catch yourself copying the same lines again and again you can almost always just use a loop for that ;)/>
stormchaser206 #3
Posted 28 January 2015 - 06:22 PM
As far as I can tell you want to place a torch at a position, that is obstructed by a block(the torch cannot be placed "inside" the turtle)
So you can

either add another turtle.dig() in front of each turtle.place(

or replace turtle.place() by turtle.placeUp()

or turn two times to the left, place, and two times to the right ;)/>

btw: they call them loops. if you catch yourself copying the same lines again and again you can almost always just use a loop for that ;)/>
It worked! Thanks.