When I run the mine up function on all 625 turtles they all start mining up, then a random number of them just stop even though there is a block above them and the rest successfully finish mining.
Here is the code they all run on startup:
function set()
x=0
while turtle.detectUp() do
print(tostring(x))
turtle.digUp()
turtle.up()
sleep(1)
x=x+1
end
for i=1, x do
turtle.down()
end
turtle.placeUp()
end
function reset ()
turtle.digUp()
turtle.up()
turtle.digUp()
turtle.up()
turtle.digUp()
turtle.down()
turtle.down()
turtle.placeUp()
end
function wall(a)
id,msg=rednet.recieve
if tonumber(msg)==(turtle.getItemCount(3)+(turtle.getItemCount(4)*a)) then
turtle.digUp()
turtle.up()
turtle.digUp()
turtle.up()
turtle.select(2)
turtle.placeUp()
turtle.down()
turtle.placeUp()
turtle.down()
turtle.select(1)
turtle.placeUp()
end
end
function getmod ()
id,msg=rednet.recieve()
return tonumber(msg)
end
rednet.open("right")
mdf=0
while true do
id,msg = rednet.receive()
if msg == "setMaze" then
set()
end
if msg == "resetMaze" then
reset()
end
if msg == "wallMaze" then
wall(mdf)
end
if msg == "modifyMaze" then
mdf = getmod()
end
end
Then I open rednet on a computer terminal and send "setMaze" and they all start mining up and about half of them stop after one block, (They're never the same turtles though)
Can rednet only go so far? The turtles closest to the terminal usually work, so does rednet have a range, or can only so many turtles run the same program at once without issues?
Any help would be appreciated, I spent ~12 hours straight yesterday doing cool shit in computercraft and I really want this to work.