Difference between revisions of "Textutils.slowWrite"

From ComputerCraft Wiki
Jump to: navigation, search
m (Moved to CAT:APIFunctions)
(Updated/Improved)
Line 2: Line 2:
 
{{Function
 
{{Function
 
|name=textutils.slowWrite
 
|name=textutils.slowWrite
|args= [[string (type)|string]] text
+
|args={{type|string}} text, {{type|number}} rate
|returns=Text written on the screen
+
|returns={{type|nil}}
 +
|desc=Writes 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 written (passing a value of 1 writes one character per second).
 
|api=textutils
 
|api=textutils
 
|addon=ComputerCraft
 
|addon=ComputerCraft
|desc=Writes to the screen
 
 
|examples=
 
|examples=
 
{{Example
 
{{Example
|desc=Writes text to the screen, character by character.
+
|desc=Writes "Hello World!" to the screen, 15 characters per second.
|code=textutils.slowWrite("Hello, World!")
+
|code=textutils.slowWrite("Hello, World!", 15)
|output=Hello, world!
+
 
}}
 
}}
 
}}
 
}}
  
 
[[Category:API_Functions]]
 
[[Category:API_Functions]]

Revision as of 20:43, 16 February 2015


Grid Redstone.png  Function textutils.slowWrite
Writes 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 written (passing a value of 1 writes one character per second).
Syntax textutils.slowWrite(string text, number rate)
Returns nil
Part of ComputerCraft
API textutils

Examples

Grid paper.png  Example
Writes "Hello World!" to the screen, 15 characters per second.
Code
textutils.slowWrite("Hello, World!", 15)