"RPG-style" speech

Started by Mugs, Sat 18/02/2006 18:21:49

Previous topic - Next topic

Mugs

I have two questions:

First of all, I want the speech text to appear in a small box at the bottom of the screen.  Kinda like a text window, but I don't want the window to change it's size depending on the amount of text written.  How can I do that?

Second, is it possible to make the text gradually appear, one letter at the time?

All I want is a kind of "RPG-style" speech.


Cool stuff I found out: Men are four times more likely to be struck by lightning than women.  Wow, really? [dirty joke] Maybe this has to do with the fact that us men have "lightning rods"? [/dirty joke]

Ashen

For the first question - You could script a custom function to turn on a GUI with a Label object to display the text where and with whatever width you want, e.g. (V2.7 code)
Code: ags

function DisplayEx(string message) {
  lblDisplay.SetText(message);
  gDisplay.Visible = true;
  WaitMouseKey(40);
  gDisplay.Visible = false);
}

There IS a way to specify a maximum width for Display messages (e.g. see the DisplayAt(...) function), but I don't think there's a way to set a minimum - unless you want to make a function to pad messages out with spaces, until they reach the required width.

For the second one, Kinoko wanted something similar a while ago, this was the outcome - and a forum search for 'TypeLine', or 'Typewriter text' should turn up a few other options and improvements to the code.
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk