Posted 06 January 2013 - 01:06 PM
Hi. I'd like to ask, why my program reacts just when the redstone signal goes form true to false? Is possible to make the opposite? Thanks.
My code
My code
Spoiler
function getPos()
print("Checking")
repeat
local rWhite = redstone.testBundledInput("right", colors.white)
local rOrange = redstone.testBundledInput("right", colors.orange)
local rMagenta = redstone.testBundledInput("right", colors.magenta)
event, param = os.pullEvent()
if event == "redstone" then
if rWhite then
cabPos = 0
print("I'm 1")
return cabPos
elseif rOrange then
cabPos = 1
print("I'm 2")
return cabPos
elseif rMagenta then
cabPos = 2
print("I'm 3")
return cabPos
end
end
until (rWhite or rOrange or rMagenta) == true
end