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

How to use slow print?

Started by EmTeaKay, 02 April 2012 - 10:25 PM
EmTeaKay #1
Posted 03 April 2012 - 12:25 AM
How do I use slow print? Or whatever it is called. It's like print except it does it slowly. Can someone help me out?
cant_delete_account #2
Posted 03 April 2012 - 12:59 AM
Do: textutils.slowPrint("par1Str") where "par1Str" is the text you want it to slowly print.
virtualayu #3
Posted 08 April 2012 - 04:10 AM
or you can do "oldschool" ^^ like
write("H")
sleep(0,1)
write("e")
sleep(0,1)
write("l")
sleep(0,1)
write("l")
sleep(0,1)
write("o")

but it's a lot of code ^^
kamnxt #4
Posted 08 April 2012 - 11:39 AM
You can also set the speed.

speed = 5
string = "A string!"
textutils.slowPrint(string, speed)
multitrym #5
Posted 29 June 2012 - 02:10 AM
You can also shortcut it.

function sprint(text)
textutils.slowPrint(text)
end
Type that at the top, when you want a slowprint just type:

sprint "Insert text here!"
MysticT #6
Posted 29 June 2012 - 02:20 AM
You can also shortcut it.

function sprint(text)
textutils.slowPrint(text)
end
Type that at the top, when you want a slowprint just type:

sprint "Insert text here!"
Even shorter:

local sprint = textutils.slowPrint

sprint("Text Here")
And you can use the time parameter:

sprint("Text", 3)
Mads #7
Posted 29 June 2012 - 05:46 PM
Or you can code your own function. Like this:

function slowPrint(text, time)
    for i = 1, text:len() do
	    io.write(text:sub(i, i))
	    sleep(time)
    end
    io.write("n")
end

slowPrint("Hello, World!", .5)