i want it to scroll across the computer when my program starts i found this on another dudes post and it works for his program but i cant seem to get mines as clear as his mines messes up on the last letter mostly.
[attachment=438:the string.rtf]
Mostly, that's just a really terrible way of doing it. Just define a single 2d array and scroll through it one column at a time. :/
strLine1 = ".d8888. d888888b db db d88888b d88888b db db .d88b. db d88888b "
strLine2 = "88' YP `~~88~~' 88 88 88' 88' 88 88 .8P Y8. 88 88' "
strLine3 = "`8bo. 88 88 88 88ooo 88ooo 88ooo88 88 88 88 88ooooo "
strLine4 = " `Y8b. 88 88 88 88~~~ 88~~~ 88~~~88 88 88 88 88~~~~~ "
strLine5 = "db 8D 88 88b d88 88 88 88 88 `8b d8' 88booo. 88. "
strLine6 = "`8888Y' YP ~Y8888P' YP YP YP YP `Y88P' Y88888P Y88888P "
local marchTextRtoL = function (strMessage,intLine,strHeader,mon,strSep)
local intOffset = 1
local strHeader = strHeader or "" --Optional
local mon = mon or term.native --Optional
local strSep = strSep or " | " --Optional
local intWidth = mon.getSize()
local strBlank = string.rep(" ",intWidth)
local _, y = mon.getCursorPos()
local intLine = intLine or y -- Optional
local strMsgBuilder = tostring(strMessage)
local strMsgText = strBlank..strHeader..strSep..strMsgBuilder..strBlank
return function ()
local intOff = intOffset
if intOff > string.len(strMsgText) then
intOffset = 1
end
intOffset = intOffset + 1
local strMsgDisplay = string.sub(strMsgText, intOff, intOff + intWidth - 1)
mon.setCursorPos(1, intLine)
mon.clearLine()
mon.write(strMsgDisplay)
end
end
local scrollLine1 = marchTextRtoL(strLine1,1,"",_,"")
local scrollLine2 = marchTextRtoL(strLine2,2,"",_,"")
local scrollLine3 = marchTextRtoL(strLine3,3,"",_,"")
local scrollLine4 = marchTextRtoL(strLine4,4,"",_,"")
local scrollLine5 = marchTextRtoL(strLine5,5,"",_,"")
local scrollLine6 = marchTextRtoL(strLine6,6,"",_,"")
while true do
scrollLine1()
scrollLine2()
scrollLine3()
scrollLine4()
scrollLine5()
scrollLine6()
sleep(0.2)
end