Posted 03 September 2014 - 11:48 PM
Hi im new to CC and was hoping to get some help with what i thought was easy.
I have got 2 monitors and computer hoocked up to big reactor.
so far I have managed to get the monitor to show in green when the reactor is active, when i turn the reactor off i want it to show offline in red but nothing shows on screen. No errors are shown on computer, just no text when i turn off reactor.
currently it shows like this when on Reactor: Online and like this when off Reactor:
I have got 2 monitors and computer hoocked up to big reactor.
so far I have managed to get the monitor to show in green when the reactor is active, when i turn the reactor off i want it to show offline in red but nothing shows on screen. No errors are shown on computer, just no text when i turn off reactor.
currently it shows like this when on Reactor: Online and like this when off Reactor:
local reactor = peripheral.wrap("BigReactors-Reactor_1")
local turbine = peripheral.wrap("BigReactors-Turbine_0")
local mon = peripheral.wrap("left")
while true do
sleep(5)
mon.clear()
mon.setCursorPos(1,1)
mon.setTextColor(colors.white)
mon.write("Reactor: ")
if reactor.getActive (true) then
mon.setTextColor(colors.lime)
mon.write("Online")
elseif reactor.getActive (false) then
mon.setTextColor(colors.red)
mon.write("Offline")
end
end