I have $gameVariable.value(1) displayed on my HUD, continuously updating. I am trying to create a system to display a string one letter at a time, much like the default text system but that can be updated while other things are happening.
It feels like it should be fairly simple but the code I have just causes the game to freeze on start. Help would be hugely appreciated.
It feels like it should be fairly simple but the code I have just causes the game to freeze on start. Help would be hugely appreciated.
Code:
var testString = "I'll never be hungry again."
var ticker = function() {
var i = 0;
do {
setTimeout(function(){
$gameVariables.setValue(1, testString.slice(0,i));
i++;
}, 100);
}while (i <= testString.length)
};