Hi, just a quick question this time...
Is there a way to slow down the speed at which the console produces text?
You see, am trying to create a sort of 'NPC' for a Choose-your-own-adventure-kidnf-of-game, but the speed at which it speaks is sort of off-putting...
One possibility is to write your own print function that has a time delay between each character in the string to be printed. For example, something like this:
1 2 3 4 5 6
void print_slow(string const & str, unsignedconst delay_between_chars) {
for (int i = 0 ; i < str.size() ; ++i) {
cout << str.at(i);
delay(delay_between_chars);
}
}