Hi All,
Was wondering if it is possible to get typewriter text to type at a defined rate i.e. characters per second, rather than over a fixed duration?
The typewriter text is great, but a fixed duration is not that useful when trying to keep typewriter text speed uniform across a project with different text string sizes.
Rate*text.length should work.
Edit: actually it's rate*len(text)
Thanks WackyToaster
Where would that be entered to make it work?
How would you deal with overriding the duration, as it is a required input?
Cheers
Into the duration for the text.
For example 0.1*len(yourtext) will type the text at a rate of 1 character every 0.1 seconds regardless of length. len(yourtext) gives you the number of characters in your text.
WackyToaster
Ah. Thanks heaps
Works like a charm :)
Returning to this. I am hoping to iterate through arrays that contain the text data. Can you think of an elegant way to get a uniform text speed when referencing an array location rather than actual text? At the moment the best I have (not tested yet) is to use a global variable that gets updated to the current text string from the array and then use the same solution but with len(variablestring) rather than text.
Your idea would work.
Develop games in your browser. Powerful, performant & highly capable.
Text: ARRAY.At(varX, varY)
Duration: 0.05*len(ARRAY.At(varX, varY))
For anyone else that is trying this, just confirming that yes it does indeed work.