17 posts
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/>/>
1604 posts
Posted 03 July 2012 - 08:59 PM
Check out the rs api in the
wiki.
17 posts
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
1604 posts
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
17 posts
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
1604 posts
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
17 posts
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 !!!!