I've been attempting to create a script that "types" text into a label, one letter at a time. It starts by the player entering the name of the label in the function (LabelName), and the text of the string to type (TypeText). It should then, running through the "while" cycle, add an extra letter on to the string "TextInProgress" from the "TypeText" string, and update the label, before returning to the beginning and moving on to the next letter.
This, unfortunately, is not the case. It seems instead to just make the label "LabelName" blank. I'd been putting in display functions to tell me what it had been doing, so I'm certain that it's moving up through the numbers, just not adding the letters on to the TextInProgress string.
Can anybody see what I'm missing here?
Code: AGS
This, unfortunately, is not the case. It seems instead to just make the label "LabelName" blank. I'd been putting in display functions to tell me what it had been doing, so I'm certain that it's moving up through the numbers, just not adding the letters on to the TextInProgress string.
Can anybody see what I'm missing here?
function TechnoTextType(Label *LabelName, String TypeText){
int TotalLetters = TypeText.Length;
int LetterOn = 0;
String TextInProgress = "";
while(LetterOn<TotalLetters){
TextInProgress.AppendChar(TypeText.Chars[LetterOn]);
LabelName.Text = TextInProgress;
LetterOn++;
Wait(1);
}
}