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

turtle detect and modem message

Started by Taryon, 26 March 2014 - 10:10 PM
Taryon #1
Posted 26 March 2014 - 11:10 PM
Hi
How could I get my turtle detecting and digging while wait a modem message?
CometWolf #2
Posted 27 March 2014 - 07:41 AM
Use the parallel API
http://computercraft.info/wiki/Parallel_(API)

parallel.waitForAny(
  function()
    while true do
      rednet.receive()
    end
  end,
  function()
    while true do
      turtle.detect()
    end
  end
)
You get the idea.