Usage of the bundled cable using the Redstone API

From ComputerCraft Wiki
Revision as of 09:45, 25 March 2014 by Oeed (Talk | contribs) (Categorised page)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is a code snippet created to help you understand how the Redstone_(API) works when using the bundledcable functions!

   sSide = "front"
   redstone.setBundledOutput(sSide, -- enable one color (black) and disable all others
   sleep(2) -- chill out for two seconds
   redstone.setBundledOutput(sSide, colors.white) -- enable white and disable all others
   -- ^ combine last input with new input, in this case white is mixed with brown, making those two colors enabled.
   redstone.setBundledOutput(sSide, 0)  -- disable all output
   redstone.setBundledOutput(sSide, colors.combine(colors.white, -- enable both black and white wires.
   -- ^ 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.