Jump to content




How do you activate an redpower cable through an computer?


  • You cannot reply to this topic
8 replies to this topic

#1 Zambonie

  • Members
  • 477 posts
  • LocationSpring Hill, Fl

Posted 25 January 2013 - 01:22 PM

I am making an high-secured building using cc,buildcraft,and rp2.For the main enterance,I put rp2 lights to tell you if the pass is right or not.And to power those lights im using bundled and colored cables.And when I try to turn the cables on,it wont work.Is there a code to turn on the cables?

#2 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 25 January 2013 - 01:25 PM

rs.setBundledOutput( <side>, <color> )

where side is a string of the side to output and color is the color of the cable ( i.e. colors.black colours.red colors.blue etc )

#3 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 25 January 2013 - 01:29 PM

Check out the Redstone API. It tells you exactly how we interact with redstone and redpower.

#4 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 25 January 2013 - 01:31 PM

And colors.combine() gives the value needed to set a combination of colors. Like:
rs.setBundledOutput("front", colors.combine( colors.red, colors.yellow ) )


#5 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 25 January 2013 - 01:34 PM

View PostOrwell, on 25 January 2013 - 01:31 PM, said:

And colors.combine() gives the value needed to set a combination of colors. Like:
rs.setBundledOutput("front", colors.combine( colors.red, colors.yellow ) )
And that can ever work to add onto the existing output colours by doing this:
rs.setBundledOutput("front", colors.combine( rs.getBudledInput("front"), colors.yellow ) )


#6 Zambonie

  • Members
  • 477 posts
  • LocationSpring Hill, Fl

Posted 25 January 2013 - 01:37 PM

Ok thanks guys.

#7 Zambonie

  • Members
  • 477 posts
  • LocationSpring Hill, Fl

Posted 25 January 2013 - 01:48 PM

Ok,One more question,How do you turn it off?

#8 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 25 January 2013 - 01:53 PM

View PostP4isHere., on 25 January 2013 - 01:48 PM, said:

Ok,One more question,How do you turn it off?

rs.setBundledOutput(side, 0)
;)

#9 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 25 January 2013 - 02:01 PM

Also if you only want to turn off one colour but leave the rest on
rs.setBundledOutput( <side>, colors.subtract( rs.getBundledInput( <side> ), <color> ) )

where <side> and <color> have the appropriate values





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users