Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: GoToHellDave on Wed 03/04/2013 16:16:38

Title: Displaying a text box during dialogs
Post by: GoToHellDave on Wed 03/04/2013 16:16:38
Hi AGS Community.

I have a quick question regarding text boxes.

Basically, we're trying to have a custom text box that is a kind of speech bubble, in which all dialog text will be displayed. I know there are four settings for dialog; LucasArts, SierreTransparent, SierraWIthBackground and WholeScreen. We want to use the LucasArts setting but we would like it to have a text box around it, much in the same way the 'Display' function does. Is there any way I can customise how the dialog is displayed and make it appear appear within a text box?

Help is appreciated as always.

Ben.
Title: Re: Displaying a text box during dialogs
Post by: Khris on Wed 03/04/2013 18:14:03
No, if you want to customize speech, you have to use your own function, which also means you can't use standard dialog speech any longer and you have to find a workaround to use voice speech.
To make things a bit easier, you can use an extender function:
Code (ags) Select
function MySay(this Character*, String text) {
  // default behaviour for now
  this.Say(text);
}

  // use it like this in scripts and dialog scripts
  cEgo.MySay("Hello");

I guess you could try to figure out the dimensions of the text generated by .Say and show the box using an Overlay before the .Say line, then remove it afterwards.
Title: Re: Displaying a text box during dialogs
Post by: GoToHellDave on Wed 10/04/2013 12:48:44
Thanks Khris.