Hi guys,
I need help for a simple code,
I want to a computer, when he broadcast "ABRIR" the turtle's break a block on front and place it again
Rednet
Started by PedroBarbosa, Jan 21 2013 05:30 AM
4 replies to this topic
#1
Posted 21 January 2013 - 05:30 AM
#2
Posted 21 January 2013 - 05:32 AM
Like this?
while true do
id, msg = rednet.receive()
if msg == "ABRIR" then
turtle.dig()
turtle.place()
end
end
#3
Posted 21 January 2013 - 05:33 AM
PedroBarbosa, on 21 January 2013 - 05:30 AM, said:
Hi guys,
I need help for a simple code,
I want to a computer, when he broadcast "ABRIR" the turtle's break a block on front and place it again
I need help for a simple code,
I want to a computer, when he broadcast "ABRIR" the turtle's break a block on front and place it again
For the computer:
rednet.open(side) --Change side to the side your modem is on, in quotation marks
rednet.broadcast("ABRIR")
For the turtle:
rednet.open(side) --Same as before
while true do
id, msg = rednet.receive()
if msg == "ABRIR" then
turtle.dig()
turtle.place()
end
end
EDIT: Ninja'd by Lyqyd
#4
Posted 21 January 2013 - 05:36 AM
Though, I was operating on the assumption that he'd know to open rednet on the appropriate side, but it is kind of funny that our code was otherwise identical.
#5
Posted 21 January 2013 - 05:40 AM
Tkx guys
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











