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

Rednet and Trutles

Started by TipTricky, 18 January 2013 - 08:29 PM
TipTricky #1
Posted 18 January 2013 - 09:29 PM
I want to make a turtle dig a block in front of it when it receives a rednet.broadcast("Open") i have a computer that broadcasts open when you enter the password. but i can figure out how to get the turtle to only dig when it receives the open command from the computer. Can some one give me some advice?
Luanub #2
Posted 18 January 2013 - 09:38 PM
just have it turtle.dig() if the message == "Open"


while true do
local id, msg = rednet.receive()
if msg == "Open" then
  turtle.dig()
end
end
theoriginalbit #3
Posted 18 January 2013 - 09:41 PM
When receiving messages via rednet it receives 3 things in this order: senderId, message, distanceTravelled

So use comparison on the message. To check if its the desired message.

When receiving messages via rednet it receives 3 things in this order: senderId, message, distanceTravelled

So use comparison on the message. To check if its the desired message.
TipTricky #4
Posted 18 January 2013 - 09:47 PM
Ok cool. You two have been most helpful today im going to start up FTB real quick and check it out.
3ydney #5
Posted 19 January 2013 - 12:39 AM
I have written a program called Redsend. It allows the user to send a to type a program and send it to another computer! Its great!

http://turtlescripts.com/file/gjdh4l