rednet.open("right")
while true do
id, message = rednet.receive()
if message == "open" or rs.getInput("righ") == true then
turtle.forward()
turtle.turnLeft()
turtle.dig()
turtle.up()
turtle.dig()
turtle.down()
turtle.turnRight()
turtle.back()
sleep(5)
turtle.forward()
turtle.turnLeft()
turtle.place()
turtle.up()
turtle.place()
turtle.down()
turtle.turnRight()
turtle.back()
end
end
or
#1
Posted 10 January 2014 - 11:10 PM
#2
Posted 10 January 2014 - 11:14 PM
if you're having and error it's because its rs.getInput("right") you missed the t in right.
Edited by theoriginalbit, 10 January 2014 - 11:15 PM.
#3
Posted 10 January 2014 - 11:24 PM
edit: I made it or rs.getInput("back") == true then etc...
and made the redstone come from the back and it still doesn't work. I'm confused.
Edited by applesauce10189, 10 January 2014 - 11:34 PM.
#4
Posted 11 January 2014 - 12:23 AM
If you're expecting a change in redstone to make it skip past the rednet.receive() call, that's not going to happen because that call specifically waits until such time as a rednet message comes in.
A simple way around that would be to pass a short timeout value to it, eg:
id, message = rednet.receive(1)
Edited by Bomb Bloke, 11 January 2014 - 12:26 AM.
#5
Posted 11 January 2014 - 12:51 AM
applesauce10189, on 10 January 2014 - 11:24 PM, said:
Aside from what Bomb Bloke covered above, this is correct--a wireless modem, tool, or other peripheral on the side of the turtle means that it cannot use that side for redstone i/o.
#6
Posted 11 January 2014 - 09:48 AM
Lyqyd, on 11 January 2014 - 12:51 AM, said:
#7
Posted 11 January 2014 - 09:56 AM
#8
Posted 11 January 2014 - 10:35 AM
Would be better replacing id, message = rednet.receive() to something like event, id, message = os.pullEvent()
Which would yield to both a rednet message and a redstone signal.
Edited by Anavrins, 11 January 2014 - 10:36 AM.
#9
Posted 11 January 2014 - 12:55 PM
Bomb Bloke, on 11 January 2014 - 12:23 AM, said:
If you're expecting a change in redstone to make it skip past the rednet.receive() call, that's not going to happen because that call specifically waits until such time as a rednet message comes in.
A simple way around that would be to pass a short timeout value to it, eg:
id, message = rednet.receive(1)
Lyqyd, on 11 January 2014 - 12:51 AM, said:
If there's any derpy spellings I woke up under half an hour ago. That's my excuse. I need to stop making excuses. Oh well.
#10
Posted 11 January 2014 - 02:29 PM
if bool then -- Checking if bool is true
-- Code
elseif not bool then -- Checking if it's false
-- Code
else -- If it's nil or whatever :-P
-- Code
end
Edited by Hellkid98, 11 January 2014 - 02:31 PM.
#11
Posted 11 January 2014 - 02:43 PM
Hellkid98, on 11 January 2014 - 02:29 PM, said:
if bool then -- Checking if bool is anything other than false or nil -- Code elseif not bool then -- Checking if it's false or nil, might aswell use the else here and drop the other one. -- Code else -- This will never happen -- Code end
#12
Posted 11 January 2014 - 05:02 PM
CometWolf, on 11 January 2014 - 02:43 PM, said:
Hellkid98, on 11 January 2014 - 02:29 PM, said:
if bool then -- Checking if bool is anything other than false or nil -- Code elseif not bool then -- Checking if it's false or nil, might aswell use the else here and drop the other one. -- Code else -- This will never happen -- Code end
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











