Posted 07 April 2012 - 02:02 PM
I am trying to make some sort of base alert. For this I would like to have a monitor giving the current status. (all ok/Alert/etc)
I am new to lua and afther following some tutorials and trying out some code I ended with the following code.
Currently this works without problems. I would like to have the letters ALERT flicker on the screen (to draw more attention)
though when I try to delete/clear the text ALERT afther the 1 second sleep nothing happens. I have tried using
m.clear()
m.setCursorPos(1,1)
And I have tried using the clearline command
m.clearline()
Neither of those worked could someone please explain to me how to clear text on a monitor?
thanks,
DeviousD
I am new to lua and afther following some tutorials and trying out some code I ended with the following code.
Currently this works without problems. I would like to have the letters ALERT flicker on the screen (to draw more attention)
m = peripheral.wrap("right") --sets m as the monitor
while true do
if redstone.testBundledInput("bottom", colors.magenta) == true --checks magenta redwire
then - --shows alert in caps when redwire is active
m.setCursorPos(1,1)
m.setTextScale(3)
m.write("ALERT")
sleep(1)
else -- shows all ok in caps when redwire is inactive
m.setCursorPos(1,1)
m.setTextScale(2)
m.write("ALL OK")
sleep(1)
end
end
though when I try to delete/clear the text ALERT afther the 1 second sleep nothing happens. I have tried using
m.clear()
m.setCursorPos(1,1)
And I have tried using the clearline command
m.clearline()
Neither of those worked could someone please explain to me how to clear text on a monitor?
thanks,
DeviousD