Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = {...}
- --
- if #tArgs ~= 0 then
- print("Usage: orGate")
- print(" -- the side opposite the screen is output")
- print(" -- output is hot if any side (front,left,right) is hot")
- return
- end
- local sides = toNumber(tArgs[1])
- local function testSide(side)
- return ( (redstone.getInput(side)) or (redstone.getBundledInput(side) >0) )
- end
- while true do
- if ( testSide("right") or testSide("left") or testSide("front") ) then
- redstone.setOutput("back",true)
- redstone.setBundledOutput("back",255)
- else
- redstone.setOutput("back",false)
- redstone.setBundledOutput("back",0)
- end
- os.pullEvent("redstone")
- end
Advertisement
Add Comment
Please, Sign In to add comment