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

Basic Path Finder/Follower

Started by ComputerCraftFan11, 30 May 2012 - 03:23 AM
ComputerCraftFan11 #1
Posted 30 May 2012 - 05:23 AM
This is my basic path finder program, it follows the path you set.

Code:


local x = 0

while true do
turtle.turnLeft()


if turtle.detect() then
if turtle.compare() then
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.turnLeft()
turtle.place()

x = 0
else
x = x+1
end
else
x = x+1
end

if x==6 then break end
end

How to setup a track:
  • Put a block in the first slot
  • Create a straight line of the same block you put in the first slot
  • ?????
  • Profit!
  • Now mess with what you did above.
Here is a example track:
ComputerCraftFan11 #2
Posted 30 May 2012 - 05:29 AM
(Reserved for posting updates/editing this post)

*Minor Update: Added a breaker if the turtle has no more paths (5/29/2012)