Posted 30 January 2013 - 08:57 PM
Greetings!
Here is what I'm trying to do:
However, I am not sure how to specify the turtle i'm trying to copy to.
the end result I'm trying to accomplish is that each turtle is deployed by the main turtle, then main turtle copies the program the turtle is going to run along wiht a secondary program which is just a path back tot he starting point.
I've turned this from a castle builder into a turtle version of a IC quarry. basically it uses 36 turtles to dig a 60x60 hole…
Once it is finished I planned on posting it on the forums to see what everyone thought. the program also uses rednet to syncronize the digging, hoping to make em like synchronized swimmers :D/>
EDIT:
If this isn't possible. Which portion of the wiki should I focus on to:
instead of the main turtle copying files, use a floppy disk to copy the files, however I would want to be able to store the count someway ( can I >> to another program in lua?) so that each turtle isn't given all the files, just the ones it needs for its specific task. basically just write count to another file that startup calls on to know its next file to copy. is this possible to do? Like, can I cat a file in lua somehow and then take what i've pulled and use it as a variable?
Here is what I'm trying to do:
count=1
while count <= 36 do
turtle.place()
t=peripheral.wrap("front")
fs.copy("paths/"..count,"startup")
fs.copy("return/"..count"r","return")
fs.copy("dark","dark")
t.turnOn()
count = count +1
rednet.receive()
end
count=1
while count <= 36 do
if turtle.detect() then
turtle.dig()
else
turtle.sleep(.1)
end
count=count+1
end
turtle.forward()
while true do
turtle.turnRight()
end
However, I am not sure how to specify the turtle i'm trying to copy to.
the end result I'm trying to accomplish is that each turtle is deployed by the main turtle, then main turtle copies the program the turtle is going to run along wiht a secondary program which is just a path back tot he starting point.
I've turned this from a castle builder into a turtle version of a IC quarry. basically it uses 36 turtles to dig a 60x60 hole…
Once it is finished I planned on posting it on the forums to see what everyone thought. the program also uses rednet to syncronize the digging, hoping to make em like synchronized swimmers :D/>
EDIT:
If this isn't possible. Which portion of the wiki should I focus on to:
instead of the main turtle copying files, use a floppy disk to copy the files, however I would want to be able to store the count someway ( can I >> to another program in lua?) so that each turtle isn't given all the files, just the ones it needs for its specific task. basically just write count to another file that startup calls on to know its next file to copy. is this possible to do? Like, can I cat a file in lua somehow and then take what i've pulled and use it as a variable?