User:Oddstr13/Sandbox/Example test
From ComputerCraft Wiki
Revision as of 02:44, 16 March 2015 by Oddstr13 (Talk | contribs) (Created page with " {{Example |desc=Enable a single color, disable all others. |code=redstone.setBundledOutput("back", colors.red) |output=Red }} {{Example |desc=Enable two colors, disable...")
Example | |
Enable a single color, disable all others. | |
Code |
redstone.setBundledOutput("back", colors.red) |
Output | Red |
Example | |
Enable two colors, disable all others. | |
Code |
redstone.setBundledOutput("back", colors.combine(colors.red, colors.green)) |
Output | Red, Green |
redstone.setBundledOutput(sSide,colors.combine(redstone.getBundledOutput(sSide),colors.brown)) -- ^ combine last input with new input, in this case white is mixed with brown, making those two colors enabled.
sleep(2) redstone.setBundledOutput(sSide, 0) -- disable all output
sleep(2) redstone.setBundledOutput(sSide,colors.subtract(redstone.getBundledOutput(sSide), colors.black)) -- ^ disable the black wire but keep all other wires enabled, in this case it disables the black wire but keeps the white wire enabled from the last command.
If you still need help with the bundledcables, i suggest asking on the forums or going on IRC.