I want to set the Computer 2 Colored Outputs to one bundled Cable.
I type in
rs.setBundletOuput("back", colors.organge) --> Orange Wire gets powered
Next, I type this
rs.setBundletOuput("back", colors.red) --> Red Wire gets powered , orange wire gets unpowered
----------------
This is what i'm trying
rs.setBundletOuput("back", colors.organge) --> Orange Wire gets powered
rs.setBundletOuput("back", colors.red) --> Red ANDOrange Wire gets powered
How do I have to do this?
[LUA][QUESTION][PROGRAMMING] rs.setBundledOutput...
Started by TheEisbaer, Sep 25 2012 07:23 PM
computer networking utility
7 replies to this topic
#1
Posted 25 September 2012 - 07:23 PM
#2
Posted 25 September 2012 - 07:26 PM
Hope it helps!
rs.setBundledOutput("back", colors.orange, colors.red)
#3
Posted 25 September 2012 - 07:27 PM
You are looking for the colors.combine() and colors.subtract() functions. Try this:
Edit: You can also add multiple colors at a time, by adding more colors in the parenthesis for colors.combine or colors.subtract. Like this:
rs.setBundledOutput("back",colors.combine(colors.orange)) --orange wire on
rs.setBundledOutput("back",colors.combine(colors.red)) --orange stays on, red also turned on.
rs.setBundledOutput("back",colors.subtract(colors.orange)) --orange wire turned off, red still on
rs.setBundledOutput("back",0) --all colors turned off, no matter what
Hope that helps!Edit: You can also add multiple colors at a time, by adding more colors in the parenthesis for colors.combine or colors.subtract. Like this:
rs.setBundledOutput("back",colors.combine(colors.red,colors.orange)) --both colors added at the same time.
Edited by Cranium, 25 September 2012 - 07:29 PM.
#5
Posted 25 September 2012 - 07:31 PM
Cranium, on 25 September 2012 - 07:27 PM, said:
You are looking for the colors.combine() and colors.subtract() functions. Try this:
Edit: You can also add multiple colors at a time, by adding more colors in the parenthesis for colors.combine or colors.subtract. Like this:
rs.setBundledOutput("back",colors.combine(colors.orange)) --orange wire on
rs.setBundledOutput("back",colors.combine(colors.red)) --orange stays on, red also turned on.
rs.setBundledOutput("back",colors.subtract(colors.orange)) --orange wire turned off, red still on
rs.setBundledOutput("back",0) --all colors turned off, no matter what
Hope that helps!Edit: You can also add multiple colors at a time, by adding more colors in the parenthesis for colors.combine or colors.subtract. Like this:
rs.setBundledOutput("back",colors.combine(colors.red,colors.orange)) --both colors added at the same time.
Matrixmage, on 25 September 2012 - 07:26 PM, said:
Hope it helps!
rs.setBundledOutput("back", colors.orange, colors.red)
#6
Posted 25 September 2012 - 07:38 PM
Cranium, on 25 September 2012 - 07:27 PM, said:
You are looking for the colors.combine() and colors.subtract() functions. Try this:
Edit: You can also add multiple colors at a time, by adding more colors in the parenthesis for colors.combine or colors.subtract. Like this:
rs.setBundledOutput("back",colors.combine(colors.orange)) --orange wire on
rs.setBundledOutput("back",colors.combine(colors.red)) --orange stays on, red also turned on.
rs.setBundledOutput("back",colors.subtract(colors.orange)) --orange wire turned off, red still on
rs.setBundledOutput("back",0) --all colors turned off, no matter what
Hope that helps!Edit: You can also add multiple colors at a time, by adding more colors in the parenthesis for colors.combine or colors.subtract. Like this:
rs.setBundledOutput("back",colors.combine(colors.red,colors.orange)) --both colors added at the same time.
rs.setBundledOutput("back",colors.combine(colors.orange)) --orange wire on
rs.setBundledOutput("back",colors.combine(colors.red)) --orange stays on, red also turned on.
#7
Posted 25 September 2012 - 08:10 PM
use notepad++, it's the best
/>
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











