-
Hello, Just to preface this I’m really new to programming - So I’m trying to create a text adventure using the console in C#. I’ve made a dialogue handler that changes the colour using
But want it to have expanded capability a little. I’m just not sure how to go about this - I’d like after each dialogue event that it did Console.ReadKey(); as part of it. Also, but if a side question - is there a way to use two functions at the same time for a single piece of text? I wanted to add a typewriter style effect to text so it doesn’t just pop up but I’m not sure how to go about that. Thanks in advance, any help is greatly appreciated |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
>Also, but if a side question - is there a way to use two functions at the >same time for a single piece of text? You can call as many functions for a piece of text as you want:
>I wanted to add a typewriter style effect to text so it doesn’t just pop up >but I’m not sure how to go about that. I googled “typewriter effect C#” and found a forum thread which shows how you might create a typewriter-like effect. Or this one. Except both of them are missing a final “Console.WriteLine();” call to move to the next line. You could add a Console.ReadKey(); call at the end of your Dialogue() function to pause for user response. |
Beta Was this translation helpful? Give feedback.
-
Thanks for this, this is definitely what I needed :slight_smile: |
Beta Was this translation helpful? Give feedback.
>Also, but if a side question - is there a way to use two functions at the
>same time for a single piece of text?
You can call as many functions for a piece of text as you want:
>I wanted to add a typewriter style effect to text so it doesn’t just pop up
>but I’m not sure how to go about that.
I googled “typewriter effect C#” and found a forum thread which shows how you might create a typewriter-like effect. Or this one. Except both of them are missing a final “Console.WriteLine();” call to move to the next line.
You could add a Console.ReadKey(); call at the end of your Dialogue() function to pause for user resp…