Posted 23 November 2013 - 05:55 PM
I am making a turtle quarry program which sounds simple but when you have many many turtles and try to organize them to do it efficiently it is not as easy. My code grabs a turtle, fuel and moves up, places a new turtle to do the same, and then moves (eventually to its position) out of the way. It works just fine, but I have to right click on each new turtle after it is placed. Any ideas on what causes this and how to fix this. It works fine after I right click them but they don't move until I do so. Here is my code (This is in a floppy drive under the turtles and ran as startup):
rednet.open("right");
local ID = os.getComputerID();
local x = 0;
local y = 0;
local z = 0;
local xs;
local zs;
function placeNewTurtle()
if turtle.detect() then
turtle.turnRight();
end
turtle.turnLeft();
turtle.suck();
turtle.turnRight();
turtle.up();
turtle.placeDown();
end
if turtle.detect() then
turtle.turnRight();
end
turtle.turnRight();
turtle.suck();
turtle.refuel();
turtle.turnLeft();
placeNewTurtle();
turtle.forward();
turtle.forward();