- Home /
How to get new text from this?
var letterPause = 0.2; var word = "Test"; // change this one in the inspector private var currentWord = "";
function Start () { TypeText (word); }
function AddText(newText : String) { word = newText; TypeText(word); }
private function TypeText (compareWord : String) { for (var letter in word.ToCharArray()) { if (word != compareWord) break; currentWord += letter; yield WaitForSeconds (letterPause); //for added fun, use this instead :D ... //yield WaitForSeconds(letterPause * Random.Range(0.5, 2)); } }
This script was from the other thread I am using it for my game but I don't know if it should be able to redraw again when I want to make it display another messages. So any one please help out here?
I fixed that problem from wiki scripts ah Thanks.
The question makes no sense. Please rephrase in clear English.
Answer by Mike 3 · Dec 13, 2010 at 04:20 PM
Surely you just call AddText(newText) when you want it to display another word?
Your answer
Follow this Question
Related Questions
How can somebody make text actually appear on the screen with a script 2 Answers
Show GUI if it's is near or if collide 0 Answers
Issue displaying text on screen 1 Answer
Display GUI Text after delay ? 1 Answer
Triggered on screen hint message. 1 Answer