Posted 31 May 2015 - 08:40 PM
So I picked up a sort of "dead" project of mine and started working on it again… this time with mods… Its basically just a "for-looks" subway system, and I've been using computer craft for displays that show things such as train "destination". What I wanted to do is have a screen inside the train that would display text like "This station is blahblahblah" for a little bit, then change to another piece of text after a while. So it would end up going "This station is a." (a few moments later) "The next station is b." (later…) "This station is b." etc. I already have a code that just loops one piece of text:
If there is a way to expand on this to fit what I'm trying to do that would be nice. -Tice
m = peripheral.wrap("monitor_0")
mn = peripheral.wrap("monitor_1")
pos = 14
ps = 14
m.clear()
mn.clear()
m.setTextScale(1.5)
mn.setTextScale(1.5)
while true do
if pos==-130 then
pos = 14
end
if ps==-130 then
ps = 14
end
m.clear()
mn.clear()
m.setCursorPos(pos,3)
mn.setCursorPos(ps,3)
m.write("This is Block Hill Road. Change for the Northern Line and District Link. This is a Circle Line Train to Bankside (via Iron Hill).")
pos = pos-1
mn.write("This is Block Hill Road. Change for the Northern Line and District Link. This is a Circle Line Train to Bankside (via Iron Hill).")
ps = ps-1
sleep(0.15)
end
(Looping it on two monitors, with scrolling text)If there is a way to expand on this to fit what I'm trying to do that would be nice. -Tice