Posted 22 December 2016 - 03:52 PM
Hi, new here and to computercraft. New to coding aswell. Been hooked on it the past few days and with the help of some tutorials have done a few simple things.
Here I have created 3 simple programs, all the same thing, just going to different sides of the computer, and with different text/names to correspond to the light colors. They simply turn on and off a redstone output that leads to a light/set of lights, while giving a little text that tells you to input a character to switch them on and off.
Here is the code for the 'pinklight' program. The purple and blue ones have the same exact code except changing the "side" and some of the text to correspond correctly.
My question is what would I have to do in order to put all three of these programs into one program simply called 'lights' that when ran, gives the option to turn on/off any of them in any order, i.e. Turn pink on only, turn pink and blue. Purple and Pink. None, all.. you get the idea.
I know this could probably be a achieved a lot easier with Bundled cables, but I figured I'd try to do it with just running redstone into different sides for now, as a learning experience.
Thanks!
Here I have created 3 simple programs, all the same thing, just going to different sides of the computer, and with different text/names to correspond to the light colors. They simply turn on and off a redstone output that leads to a light/set of lights, while giving a little text that tells you to input a character to switch them on and off.
Here is the code for the 'pinklight' program. The purple and blue ones have the same exact code except changing the "side" and some of the text to correspond correctly.
My question is what would I have to do in order to put all three of these programs into one program simply called 'lights' that when ran, gives the option to turn on/off any of them in any order, i.e. Turn pink on only, turn pink and blue. Purple and Pink. None, all.. you get the idea.
I know this could probably be a achieved a lot easier with Bundled cables, but I figured I'd try to do it with just running redstone into different sides for now, as a learning experience.
Thanks!