|
| 11 Aug 2014 04:44 PM |
i need a little example showing how you take a string and print 1 letter at a time. Example:
"H" "Hi"
First and second print results.
I need it for an advanced effect in my game. Thanks! |
|
|
| Report Abuse |
|
|
Alexware
|
  |
| Joined: 07 May 2010 |
| Total Posts: 661 |
|
| |
|
|
| 11 Aug 2014 04:52 PM |
No.. idk
Just a script that does something like this:
mystring = "Hello!"
for i = 1,#mystring do print(i) end
But that would print each letter. Well idk it might cause an error. Point is I want it to get the length of the string, and print them out like this:
"H" "He" "Hel" "Hell" "Hello" "Hello!" One letter at a time. I saw another post regarding this and I forgot the code. |
|
|
| Report Abuse |
|
|
|
| 11 Aug 2014 04:54 PM |
Is this what you want?, mystring = "Hello!"
for i = 1,#mystring do print(mystring:sub(0,i)) end |
|
|
| Report Abuse |
|
|
| |
|