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

Help with rednet control.

Started by deadman430, 20 March 2013 - 08:48 AM
deadman430 #1
Posted 20 March 2013 - 09:48 AM
1. How come we cant post
2.Im looking for some help on rednet were i can type in For E.g Lights On and it would connect to the lighting computer and output a redstone signal for my lights and for a few other things but they would all result in outputting a redstone signal out back All this must be typed into the computer direct not any going to %appdata% Because im on a server

p.s Im on tekkit
Lyqyd #2
Posted 20 March 2013 - 10:09 AM
Split into new topic.

You need to read the global sticky topic called Forum Guidelines.
JokerRH #3
Posted 20 March 2013 - 10:26 AM
#1 You need at least 3 posts…
#2 Since you're on tekkit I don't think you have the new version ( :P/>) and therefor this should work:

rednet.open(side) --side is a string, for example "left"
rednet.send(id, message) --id a number representing the receiving computer and message must be a string containing your message

...
rednet.close(side) --Only use this when you're done...obviously...

receiving:

rednet.open(side)
id, message, distance = rednet.receive(timeout)
--if timeout is not set it will run until it gets a message.
--id is the id of the computer that has send the message and distance is the dist. between sender and receiver (in blocks)

...
rednet.close(side)

You get the id by simply typing id into the computer's startup screen (the shell)