25 posts
Posted 01 June 2012 - 10:38 PM
I can now progmram my computer to pick up a redstone cable , but
i want it to discern between the cables inside the bundled cable so i can link more cables to it what is the comands?
Sasuke
1604 posts
Posted 01 June 2012 - 10:41 PM
You need to use the redstone and colors apis.
Use "help redstone", "help colors" and "help redpower" in the terminal to get the functions and some examples.
25 posts
Posted 01 June 2012 - 11:23 PM
OK so i did that and now it works however how do i let my computer get colour red and do something and if it gets colour yellow do somethin else i just dont know how to let it pick up the colours
1604 posts
Posted 01 June 2012 - 11:27 PM
You can use:
if rs.testBundledInput("<side>", colors.red) then -- replace <side> with the side to check
-- do something for color red
end
if rs.testBundledInput("<side>", colors.yellow) then -- replace <side> with the side to check
-- do something for color yellow
end
that way you can do something if the red cable is on and something else if the yellow is on. And if both are on, it would do both things.
25 posts
Posted 01 June 2012 - 11:32 PM
Thanx alot its working :)/>/>
25 posts
Posted 01 June 2012 - 11:36 PM
OK what script will be used to let both red and yellow run if they are both active?
like i conect my macerator with yelow to bundle and my extarctor withr red to bundle,
if the are on the give the coloured over through 1 cable to computer at the same timethen makin it have to
print("Extarctor is ON")
print("Macerator is ON")
25 posts
Posted 01 June 2012 - 11:38 PM
oke nevermind i just reread the post qeustion answered
25 posts
Posted 01 June 2012 - 11:50 PM
I have this script
if rs.testBundledInput("back",colours.white) then
print("white is on")
if rs.testBundledInput("back",colours.red) then
print("red is on")
end
end
but when i turn on the red cable linked tot the bundledcable at the back of my computer nothing hapens when i run the program,
when i turn on the white both if statements work ,whether the red wire is on or off please give me some help the wiki is useless
Sasuke
25 posts
Posted 01 June 2012 - 11:53 PM
ok i looked again at the skript so i moved the and after wher th if is and it is working!