Jump to content




(Qeustion using a bundled wire to your computer)


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

#1 Uch1ha_Sasuke

  • Members
  • 25 posts

Posted 01 June 2012 - 09: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

#2 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 01 June 2012 - 09: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.

#3 Uch1ha_Sasuke

  • Members
  • 25 posts

Posted 01 June 2012 - 10: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

#4 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 01 June 2012 - 10: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.

#5 Uch1ha_Sasuke

  • Members
  • 25 posts

Posted 01 June 2012 - 10:32 PM

Thanx alot its working :)/>

#6 Uch1ha_Sasuke

  • Members
  • 25 posts

Posted 01 June 2012 - 10: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")

#7 Uch1ha_Sasuke

  • Members
  • 25 posts

Posted 01 June 2012 - 10:38 PM

oke nevermind i just reread the post qeustion answered

#8 Uch1ha_Sasuke

  • Members
  • 25 posts

Posted 01 June 2012 - 10: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

#9 Uch1ha_Sasuke

  • Members
  • 25 posts

Posted 01 June 2012 - 10:53 PM

ok i looked again at the skript so i moved the and after wher th if is and it is working!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users