Posted 22 May 2013 - 10:39 AM
I've recently been trying to get an detection loop working for a minecart system destination selector. The code all works fine apart from resetting. When I tell the system to sleep it hangs not clearing the screen or resuming the detection loop. If I remove the sleep , the orange output will not stay on (or rather not turn on at all). With the sleep the orange output stays on, and the system does not resume. Any ideas?
Here's the code
Here's the code
term.clear()
term.setCursorPos(1,1)
i=0
local function test(rsColour,colour)
if rs.testBundledInput("right", rsColour) == true then
rs.setBundledOutput("right", colors.orange)
term.setTextColor(rsColour)
print("The next train to arrive will be ".. colour)
print("Test")
sleep(2)
rs.setBundledOutput("right", 0)
term.clear()
end
end
while true do
os.pullEvent("redstone")
term.clear()
term.setCursorPos(1,1)
test(colors.lime,"lime")
test(colors.pink,"pink")
test(colors.blue,"blue")
end
Any help would be greatly appreciated.