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

Please help!

Started by mandisen2, 22 March 2012 - 10:22 AM
mandisen2 #1
Posted 22 March 2012 - 11:22 AM
I am trying to make a automatic turtle chopper thinigi XD what i want it to do is to chop down a tree and then put down a sapling and with help from redpower 2 i can make the sapling to grow but i cant make a loop so it continiuse :/ this is what i havve done:




while turtle.detect() do
turtle.digUp()
turtle.dig()
turtle.up()
end

while not turtle.detect() do
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.place()
rs.setBundledOutput("back",colors.white)
sleep(1)
rs.setBundledOutput("back",0)
end

its bad because i started yesterday and i know nothing about scripting XD sorry :S and sorry for my bad english im fom sweden :(/>/>
Ian-Moone #2
Posted 22 March 2012 - 11:24 AM
don't worry we've all been there.
tell us what you need help with coz
all you told us is your codes bad
Liraal #3
Posted 22 March 2012 - 11:57 AM

local depth=10
for i=1, depth, 1 do turtle.down() end


while true do
print("Infinite loops hey!")
sleep(1)
end
hope this will help you
mandisen2 #4
Posted 22 March 2012 - 02:28 PM
Thank you so much!!!! now it works ;D it will chop down the tree and then plant it and chop it down again and it dosnt stop!!!
PatriotBob #5
Posted 22 March 2012 - 11:59 PM
Fair warning:
Growing trees like to eat turtles for nutrition.
(When the trees "pop" up the leaf blocks have a tendency to overwrite the turtle block)
Luanub #6
Posted 23 March 2012 - 12:07 AM
Fair warning:
Growing trees like to eat turtles for nutrition.
(When the trees "pop" up the leaf blocks have a tendency to overwrite the turtle block)

As long as the tree has sufficient room to grow, and you don't place your turtle in a bad location this shouldn't be an issue.

I place my turtles next to the saplings and have never had an issue. Allow 2 blocks on all sides of the sapling, ensure there is nothing above the sapling and you should be good to go.
PatriotBob #7
Posted 23 March 2012 - 08:53 PM
I was meaning if the turtle is currently chopping a tree and an adjacent tree pops up… it can happen.
Luanub #8
Posted 23 March 2012 - 09:30 PM
Thats why you allow adequate spacing around the tree's your harvesting. Each different type of tree has a set max radios that the leaves can spawn. :(/>/>

You just have to think/plan ahead.