Posted 29 January 2013 - 06:13 PM
Hello! What I am trying to do, is have one turtle start different programs on multiple other turtles. the files will be names "1" "2" etc. Here is waht I was trying to do:
count=1
x=count
while count <= 10 do
if turtle.detect() then
fs.copy("disk/path/x","/path/x")
else
sleep(.1)
end
local t= peripheral.wrap
t.turnOn()
count = count +1
sleep(3)
end
How do I get it to see x as a changing variable? the sleep(3) is to allow turtles to move out of the way. I wanted to find a better way to do this but I couldn't come up with anything myself. All help making x a changing variable, and possible refining how the main turtle makes sure the last trutle loaded moves out of the way would be awesome.
I really appreciate it guys! I just got into computercraft a month ago and still feeling pretty lost!
count=1
x=count
while count <= 10 do
if turtle.detect() then
fs.copy("disk/path/x","/path/x")
else
sleep(.1)
end
local t= peripheral.wrap
t.turnOn()
count = count +1
sleep(3)
end
How do I get it to see x as a changing variable? the sleep(3) is to allow turtles to move out of the way. I wanted to find a better way to do this but I couldn't come up with anything myself. All help making x a changing variable, and possible refining how the main turtle makes sure the last trutle loaded moves out of the way would be awesome.
I really appreciate it guys! I just got into computercraft a month ago and still feeling pretty lost!