24 posts
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?
1111 posts
Location
Portland OR
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
7508 posts
Location
Australia
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.
24 posts
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.
53 posts
Location
Adelaide, Australia.
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