This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
MikeBr0wne's profile picture

Help with a looping message

Started by MikeBr0wne, 24 September 2012 - 07:27 PM
MikeBr0wne #1
Posted 24 September 2012 - 09:27 PM
Hello, im extremly new to ComputerCraft and i cant seem to find what i wanted through googling, i need a piece of code that will display a message in big text, then after a definable period of time display a completly different message on a new oage, as such.

I am willing to learn how to do this but it is very complicated, and i just wanted to start out with this code.

Thanks
AmbientSound #2
Posted 25 September 2012 - 11:58 AM
I'm not totally sure what you're asking but try something like this


while true do
print("Your message here")
sleep(10)
term.clear()
term.setCursorPos(1,1)
print("Your new message here")
sleep(10)
end

what that does is print your message, wait ten seconds, clear your message, print a new message, wait ten seconds and then repeat the process. Is that close to what you wanted? Change the number inside the sleep() brackets to however many seconds you want.
sjele #3
Posted 25 September 2012 - 01:39 PM

tMsg = {"Msg one", "msg two", "msg 3"} --Store the msg's there
while true do
for i = 1, #tMsg do
print(tMsg[i])
sleep(5)
term.clear()
term.setCursorPos(1, 1)
end
end
MikeBr0wne #4
Posted 22 October 2012 - 01:52 AM
Thanks but how do i change the size of the text?
remiX #5
Posted 22 October 2012 - 02:05 AM
term.setTextScale(x)   -- x can range from 1-5 with increments of 0.5