maxime_vhw
-
Posts
4 -
Joined
-
Last visited
Posts posted by maxime_vhw
-
-
Wouldn't it be more efficient to use a loop rather than running startup which runs receiver which starts the process all over again?
I may be wrong but I'm pretty sure calling a program within a program doesn't end the first one, just halts it until the called program is finished.
Also, you may want to add a way for the computers to exchange ID's..
The receiving computer may not always be #14, possibly you could have the receivers broadcast their ID's and purpose as a lights on/off receiver and the sending computer looks for that and remembers the IDs.
Or maybe I'm just overachieving =/
insert this if you dont want to enter the ID.
To turn on.
rednet.open("right") rednet.broadcast("lights-on") write("light are now on.")
And to turn off.
rednet.open("right") rednet.broadcast("lights-off") write("light are now off.")
-
read next...
-
Tell me if you need some more help.
A.Receiver(controls the lights):
rednet.open("right") a, b = rednet.receive() if b == "lights-on" then redstone.setOutput("back",true) sleep("3") shell.run("startup") end if b == "lights-off" then redstone.setOutput("back",false) sleep("3") shell.run("startup") end
Save it as receiver 2.startup file
shell.run("receiver")
B.Sender(used to control): 1.To turn on lights
rednet.open("right") rednet.send(14, "lights-on")
Save as lights-on 2.To turn of lights
rednet.open("right") rednet.send(14, "lights-off")
Save as lights-off
Computer controlled lights
in Tekkit Classic Discussion
Posted
-