Hey there.
I’m using the following script to load a random quote from a text file:
ranQuote = new LoadVars();
ranQuote.onLoad = function(success) {
if (success) {
RanNum = Math.ceil(Math.random()*25);
ran = this[“quote”+RanNum];
quote_txt.text = ran;
}
else {
quote_txt.text = “The text failed to load due to an error”;
}
}
ranQuote.load(“questions.txt”);
Is there a line or two that I can add to this that would prevent it from choosing the previously pick number again? I mean it can use it again, just not twice in a row.
Help please?
Thanks!