I'm not sure how to explain this...
Basically I want to be able to write lines of text in a console window like old RPGs used to write their dialogue, one character at a time. An example here from the game Pokemon Mystery Dungeon(Contains spoilers btw): http://www.youtube.com/watch?v=i29juf2e92c
Basically like how the dialogue is displayed.
Edit: Should also mention, I'm going to be reading the text from a file, and I'd like to write the text in that file one character at a time.
You can just use Console.Write
to print a single character at a time without the line break that WriteLine
would provide, and call Thread.Sleep
to pause briefly between characters. For example:
using System;
using System.Threading;
class Program
{
static void Main(string[] args)
{
string text = "This will be printed one character at a time";
foreach (char c in text)
{
Console.Write(c);
Thread.Sleep(50);
}
}
}
See more on this question at Stackoverflow