Difference between revisions of "Textutils.slowPrint"

From ComputerCraft Wiki
Jump to: navigation, search
m (Moved to CAT:APIFunctions)
(Updated/Improved)
 
Line 2: Line 2:
 
{{Function
 
{{Function
 
|name=textutils.slowPrint
 
|name=textutils.slowPrint
|args= [[string (type)|string]] text
+
|args={{type|string}} text, {{type|number}} rate
|returns=Text printed on the screen
+
|returns={{type|nil}}
 +
|desc=Prints string <var>text</var> at current cursor position, character-by-character. Number argument <var>rate</var> is optional and is defaulted to 20. The higher the value of <var>rate</var>, the faster <var>text</var> is printed (passing a value of 1 prints one character per second). This function also prints a newline.
 
|api=textutils
 
|api=textutils
 
|addon=ComputerCraft
 
|addon=ComputerCraft
|desc=Prints to the screen
 
 
|examples=
 
|examples=
 
{{Example
 
{{Example
|desc=Prints text to the screen, character by character.
+
|desc=Prints "Hello, World!" to the screen, character by character, 15 characters per second.
|code=textutils.slowPrint("Hello, World!")
+
|code='''textutils.slowPrint("Hello, World!", 15)'''
|output=Hello, World!
+
 
}}
 
}}
 
}}
 
}}
  
 
[[Category:API_Functions]]
 
[[Category:API_Functions]]

Latest revision as of 20:46, 16 February 2015


Grid Redstone.png  Function textutils.slowPrint
Prints string text at current cursor position, character-by-character. Number argument rate is optional and is defaulted to 20. The higher the value of rate, the faster text is printed (passing a value of 1 prints one character per second). This function also prints a newline.
Syntax textutils.slowPrint(string text, number rate)
Returns nil
Part of ComputerCraft
API textutils

Examples

Grid paper.png  Example
Prints "Hello, World!" to the screen, character by character, 15 characters per second.
Code
textutils.slowPrint("Hello, World!", 15)