Posted 03 August 2013 - 09:48 AM
Title = Toggling state of bundled cable depending on monitor button state.
Hey i'm trying to make a touch screen with 5 buttons able to turn on and off my 5 nuclear reactors. I've pretty much just copied DW20's touch screen code (thank you very much DW20 helped a lot of people) but i've now ran into a problem with toggling between on and off for bundled cables.
For all the buttons i'm using the toggleButton "mode" if you can call it that. So when the button is green i of course also want the computer to send out a signal to the desired bundle cable colour. When the button is then red i also want the signal for the respective colour that matches with that button to be turned off.
Yeah how far i've gotten so far……
So i'm able to turn white on but i have no clue how to turn it off again.
[Lua] demo - Pastebin.com
[Lua] button - Pastebin.com
^^ above is DW20's touch program which i have copied (again thanks DW20 and no i would never be able to make above programs so i take no credit at all :P/>)
Thanks for any kind of help
Hey i'm trying to make a touch screen with 5 buttons able to turn on and off my 5 nuclear reactors. I've pretty much just copied DW20's touch screen code (thank you very much DW20 helped a lot of people) but i've now ran into a problem with toggling between on and off for bundled cables.
For all the buttons i'm using the toggleButton "mode" if you can call it that. So when the button is green i of course also want the computer to send out a signal to the desired bundle cable colour. When the button is then red i also want the signal for the respective colour that matches with that button to be turned off.
function left breeder()
button.toggleButton("left breeder")
-- This is where i need a way of both activating but also deactivating beneath signal. Been looking a jumping around with some getInput and if else statements.
rs.setBundledOutput("left", colours.white)
end
Yeah how far i've gotten so far……
So i'm able to turn white on but i have no clue how to turn it off again.
[Lua] demo - Pastebin.com
[Lua] button - Pastebin.com
^^ above is DW20's touch program which i have copied (again thanks DW20 and no i would never be able to make above programs so i take no credit at all :P/>)
Thanks for any kind of help