Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: RocketGirl on Tue 06/12/2005 00:29:36

Title: Carriage returns and quotation marks in text and speech
Post by: RocketGirl on Tue 06/12/2005 00:29:36
The documentation is a little unclear on these points, so I feel compelled to ask: Is there a way to get carriage returns and quotation marks in text that is displayed in text boxes or speech?

It's been a long time since I've done any coding, but IIRC, in Pascal you used to be able to just put double quotes ("") inside single quotes to produce a quotation mark in a non-variable string you were displaying to the screen, but I don't know if that would work in AGS. If I need a character to say something like:

The title of the book is "Astral Projection", and is on the third shelf.

then I'll need quotation marks.

Similarly, I'm not sure how to get a carriage return in text in AGS. My characters are likely to get rather verbose and I'll probably need a paragraph break once or twice WITHOUT jumping to another Say command. I could probably just plug in the ASCII code for it (13, IIRC), but the docs are desperately unclear on that functionality. In the String Formatting section, %c is the only one that DOESN'T get an example. Where does the ASCII code go? Before the c? After the c? Is c a variable that has to be declared outside the string?

For that matter, is there a way to give displayed or spoken text dimensions? As in, like, margins? If a character has a lot to say, it tends to spread all the way across the screen rather than staying confined to a space similarly sized to the character's dimensions. It kinna loses association with the character that way, and I'd prefer to be able to confine at least spoken text to a certain amount of space above the character, LucasArts-style.

I realize these should probably be self evident, but I'm still confused. Sorry, and thanks!
Title: Re: Carriage returns and quotation marks in text and speech
Post by: strazer on Tue 06/12/2005 00:32:26
 [
and
\"
Title: Re: Carriage returns and quotation marks in text and speech
Post by: RocketGirl on Tue 06/12/2005 00:36:20
Quote from: strazer on Tue 06/12/2005 00:32:26
[
and
\"

Are those in the docs anywhere? Cuz if so, I'm willing to bet there's other useful and interesting stuff in the same section.

Either way, thanks! :)
Title: Re: Carriage returns and quotation marks in text and speech
Post by: strazer on Tue 06/12/2005 00:38:34
Hm, don't know, probably not.
I've compiled some more stuff here: http://americangirlscouts.org/agswiki/index.php/Category:Tidbits_and_Snippets
Title: Re: Carriage returns and quotation marks in text and speech
Post by: RocketGirl on Tue 06/12/2005 00:43:39
There's a lot of stuff in there. I'm bookmarking that for sure. Thanks! :)
Title: Re: Carriage returns and quotation marks in text and speech
Post by: strazer on Tue 06/12/2005 01:03:34
You're welcome. :)

Regarding text width, there's a tracker entry (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=287), meaning it will be implemented sometime in the future. For now, it can probably be worked around to some extent by using the Character.SayAt function, for example.