Every developer goes through a process in which they must disconnect from how a process functions on the surface, and learn how to break a processes into technical components. It's the difference between knowing that text appears one character at a time, and knowing that the text object is set to display the left X number of characters in a string, where X equals the number of character already displayed in the text object + 1. Once you understand the technical building blocks, you can pretty much create anything you want. In my opinion, the fastest way to learn the building blocks available is to play around with C2, follow some tutorials, and make some practice games.
I don't want to sound too preachy, so here are a few tips to accomplish your goal:
- When going for a typewriting effect, display one character at a time by utilizing the "left" and "len" system expressions to determine how much of a string to display as text. There are other methods, but I believe this is the simplest method to comprehend.
- Create a state machine of the text display process. One method is to have a "state" variable. For example, State 1 can be when text is being draw. State 2 can be when the maximum number of characters are displayed, and the game is waiting for the player to press space. If in state 1, display the text character by character. When the maximum allowable characters is reached, or no more characters can be displayed, go to state 2. Also, if the player presses space while in the 1st state, automatically fill the text with the maximum number of characters, and go to state 2. If the player presses space while in state 2, go back to state 1 to display the next line of characters, or, if there is no more characters, remove all text. This is a simplified example, but it should give you an idea of how it could work.
- I would highly recommend using the spritefont object instead of the text object to display text if possible. When using spritefonts, you know the exact width and height of each character. This allows for much more sophisticated dialog systems.
- Assuming you use the spritefont object, take a look at the function I posted here. It takes a string, and breaks it out into individual lines, which is very useful for dialog systems.
Best of luck!