This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
xWoody25's profile picture

CC + Bundled Cable

Started by xWoody25, 03 July 2012 - 06:53 PM
xWoody25 #1
Posted 03 July 2012 - 08:53 PM
Im trying to make a program so when you type open it will open the first door, this is powered from Bundled Cable, the first door is the White, Second is Green and the Third is Light Blue, all i know is " rs.setBundledOutput( " and this is where i get stuck, if you can help me i will be very greatful, thanks in advance - Woody :P/>/>
MysticT #2
Posted 03 July 2012 - 08:59 PM
Check out the rs api in the wiki.
xWoody25 #3
Posted 03 July 2012 - 09:23 PM
Check out the rs api in the wiki.
I Have but in wondering how do i actually put it in code form
MysticT #4
Posted 03 July 2012 - 09:28 PM

rs.setBundledOutput(side, colors)
side is the side where the cable is. There's 6 sides: top, bottom, left, right, back, front.
colors is a number that represents the colors of cable to turn on. You can use the colors api to get them.
Example:

rs.setBundledOutput("left", colors.white) -- set white color on the left cable
To use multiple colors at the same time, use the colors api:

rs.setBundledOutput("back", colors.combine(colors.blue, colors.red)) -- set blue and red colors on the back cable
xWoody25 #5
Posted 04 July 2012 - 02:04 AM

rs.setBundledOutput(side, colors)
side is the side where the cable is. There's 6 sides: top, bottom, left, right, back, front.
colors is a number that represents the colors of cable to turn on. You can use the colors api to get them.
Example:

rs.setBundledOutput("left", colors.white) -- set white color on the left cable
To use multiple colors at the same time, use the colors api:

rs.setBundledOutput("back", colors.combine(colors.blue, colors.red)) -- set blue and red colors on the back cable
right and if i use the "sleep(5)" will it act like normal redstone?, plus thanks for the help so far
MysticT #6
Posted 04 July 2012 - 02:43 AM
I don't know what you mean with "act like normal redstone". rs.setBundledOutput turns on the given colors on the bundled cable, if you want to use normal redstone, use rs.setOutput instead.
If you want to create a "pulse" of redstone, you can use sleep:

-- turn redstone on
sleep(1)
-- turn redstone off
Example:

rs.setBundledOutput("back", colors.white) -- turn white on
sleep(1)
rs.setBundledOutput("back", 0) -- turn all colors off
xWoody25 #7
Posted 04 July 2012 - 04:39 AM
I don't know what you mean with "act like normal redstone". rs.setBundledOutput turns on the given colors on the bundled cable, if you want to use normal redstone, use rs.setOutput instead.
If you want to create a "pulse" of redstone, you can use sleep:

-- turn redstone on
sleep(1)
-- turn redstone off
Example:

rs.setBundledOutput("back", colors.white) -- turn white on
sleep(1)
rs.setBundledOutput("back", 0) -- turn all colors off
The Second one of the code was the one i was looking for, sorry for not being clear :P/>/> thanks very much !!!!