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

Help in cc/new to mod/bundledInput

Started by MrNice, 23 March 2015 - 05:11 PM
MrNice #1
Posted 23 March 2015 - 06:11 PM
Hey i need help I've got a problem and idea.

1.I need to compares input into computer left and right side bundledcables.. i thought it can be done by changing the bundledinput to a number and compare it. And how to do it..
Than i will send a signal out at 3 bundeled cable

2.How to make a simple gui/api/os clicked adds funcionality… i found on 1 site and cannot were some apis worm and i show a graphical aplication type and was wtf i want it…..!!!
Lyqyd #2
Posted 23 March 2015 - 07:03 PM
Moved to Ask a Pro.
SquidDev #3
Posted 23 March 2015 - 07:21 PM
For the bundled input the easiest way is to use redstone.testBundledInput. If you want a simple and gate for both left and right bundled cables you can do something like:


local result = 0

if redstone.testBundledInput ("left", colors.white) and redstone.testBundledInput ("left", colors.white) then
   result = colors.combine(result, colors.white)
end

redstone.setBundledOutput("front", result)

You may want to also look at the Colors API. You can repeat the middle 3 lines for each color.
KingofGamesYami #4
Posted 23 March 2015 - 10:18 PM
Simple GUIs are easy, you just write something on the screen and then pull mouse_click events until one with the correct x, y values is returned, then do something based on where they clicked. There are plenty of tutorials in the tutorial section of the forums on GUIs.

For an easy API, there's plenty of APIs in the API and Utilities section that explain how to use them, I've made a couple that are pretty much entirely automated.

As for an "easy" OS, there is no such thing. The closest you can come is NDF-Jay's OS tutorial, but if you follow it, please do not post it on the forums, we have plenty of NDF-Jay clones already.