I am working on an elevator using elevator tracks from Railcraft combined with bundled cables from ProjectRed. The way I do it is simply to run an elevator track all the way through all floors, while having different coloured cables at different points.
If you've played around with elevator tracks, you know that redstone powers the entire line downwards then two blocks up, so in order to control where the cart stops one simply has to place a redstone signal two blocks down from where you want it to stop.
As of such, I've used one colour of ProjectRed cable for each floor. I also have one computer on each floor.
This is the program on them:
shell.run("clear")
while true do
write("Select floor 1-7: ")
local Floor = read()
if Floor == "1" then
redstone.setBundledOutput("left", colors.red)
if Floor == "2" then
redstone.setBundledOutput("left", colors.blue)
end
if Floor == "3" then
redstone.setBundledOutput("left", colors.green)
end
if Floor == "4" then
redstone.setBundledOutput("left", colors.yellow)
end
if Floor == "5" then
redstone.setBundledOutput("left", colors.white)
end
if Floor == "6" then
redstone.setBundledOutput("left", colors.black)
end
if Floor == "7" then
redstone.setBundledOutput("left", colors.brown)
end
end
Now, as you know, the command setBundledOutput makes the computer switch off all colour outputs before switching on the required colour. Until now, it's fine and dandy…
The problem however, arise due to the fact that I am using different computers on each floor. As SetBundledOutput only affects the output status on the computer currently in use, previously used computers (the ones on lower levels) won't turn off their bundledoutput and thus the elevator won't go down.
So what I figured out that I need to do, is to use wireless rednet to connect to the computer on the first floor and launch the program from there, rather than having a local version of the program on each floor, basicly turning the first floor computer into a server.
Thing is, I have no clue how to do this… Is it possible to access a program that is local to a computer over a rednet network, so that all of the computers are accessing the program from the "server" rather than executing the commands locally? If so, how do I go about doing this?