Minecraft Computecraft Bundled Cable toggle. Brauche hilfe dabei!?
Ich wollte durch einen Bundle nur den Roten Kabel (Red Cable) Umschalten aber es funkt nicht wie ich es erhoft habe Bin neu bei Computercraft und zu thema Lua
right = rs.getBundledInput("right",colors.red)
if right == false then
rs.setBundledOutput("right",colors.combine(rs.getBundledInput("right"),colors.red))
else
rs.setBundledOutput("right",colors.subtract(rs.getBundledInput("right"),colors.red))
end
Habe auch noch eine zweite variante versucht aber klappt auch nicht
function toggleColor(side, col)
if colors.test(rs.getBundledInput(side), col) == true then
rs.setBundledOutput(side, colors.subtract(col, rs.getBundledInput(side)))
else
rs.getBundled.Output(side,colors.combine(col, rs.getBundledInput(side)))
end
end
toggleColor("right", colors.red)