This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Darque77's profile picture

Noob with no computercraft skill looking for some help

Started by Darque77, 05 May 2013 - 12:18 AM
Darque77 #1
Posted 05 May 2013 - 02:18 AM
I have been looking for computercraft tutorials that can explain what im looking for but I haven't had any luck. I would like to learn computercraft but it is soo confusing.

I am designing a train station for a private server (few friends) and trying to make a computer react to redstone signals that it recieves and in turn displaying on a monitor different text for a different color redstone signal (from redpower). For example: When the blue wire is activated the computer says something like "Blue Line: Ocean Station", and when yellow is activated it says something like "Yellow Line: Desert Station" and so on. The computer would say "Welcome" if there were no signals activated.

Anyone able to help? If you want to show me the basic programming for something like that or even direct me to a simple tutorial that could help would be appreciated. Thanks in advance. And be gentle :P/>/>
Lyqyd #2
Posted 05 May 2013 - 02:39 AM
Split into new topic.
Smiley43210 #3
Posted 05 May 2013 - 02:54 AM
Redstone detection: http://computercraft.../Redstone_(API), look at getBundledInput() and testBundledInput()
Print stuff in colors: http://computercraft...ki/Colors_(API), http://computercraft...wiki/Term_(API) (term.setTextColor)
Note that you can only print in color if the computer is an advanced one.

Example:
if redstone.testBundledInput(redstone.getBundledInput("back"), colors.blue)) then
  term.setTextColor(colors.blue)
  print("Blue wire is on!")
end