Dialogue onto more then one line!?

Started by Lukey J, Tue 15/12/2020 16:43:19

Previous topic - Next topic

Lukey J

im trying to get long strings to text onto more lines

Capture" border="0


Crimson Wizard

#1
Please clarify how do you do speech in your game, are you using Character.Say, a custom speech module, or scripted your own speech display?
The solution depends on that.

Lukey J

Character.Say

im using the thimbleweed template

Crimson Wizard

#3
Quote from: Lukey J on Tue 15/12/2020 23:20:29
Character.Say

I mostly asked because of the "balloon" speech box. Thimbleweed template does not do that, so I wondered if it's done by a script module or your own script.

I think Character.Say in "Lucas Arts" style only splits lines when they reach certain big width, which is something like 2/3 of the screen.
You may force linebreaks using "\n" in the text, but that may be lots of manual work, besides anything done this way may stop workin as expected if you decide to change fonts in the future, for instance. If it's fine with you, you can do that ofcourse.
If you want to implement your own automatic linebreaking I'd suggest scripting a custom speech function.

Snarky

If you use the SpeechBubble module, you can set SpeechBubble.MaxTextWidth.

Lukey J


Laura Hunt

Quote from: Crimson Wizard on Tue 15/12/2020 23:41:52
You may force linebreaks using "\n" in the text, but that may be lots of manual work, besides anything done this way may stop workin as expected if you decide to change fonts in the future, for instance. If it's fine with you, you can do that ofcourse.

Is this something new in 3.5.0? In version 3.4.3 I use the left square bracket for line breaks (cChar.Say("This is one line.[And this is another.");), and I've never had any issues.


Crimson Wizard

#7
Quote from: Laura Hunt on Wed 16/12/2020 08:44:42
Quote from: Crimson Wizard on Tue 15/12/2020 23:41:52
You may force linebreaks using "\n" in the text, but that may be lots of manual work, besides anything done this way may stop workin as expected if you decide to change fonts in the future, for instance. If it's fine with you, you can do that ofcourse.

Is this something new in 3.5.0? In version 3.4.3 I use the left square bracket for line breaks (cChar.Say("This is one line.[And this is another.");), and I've never had any issues.

"\n" is supported in AGS for some time but I don't remember since when. Personally, I don't like recommending "[" because it always seemed nonsense to me, as it is a regular character, and I have no idea why it was added as a linebreak. Maybe it was thought to be easier to remember for most people? Could be a reason too...
"\n" is a standard symbol of linebreak almost in every programming language afaik.

EDIT: for some reason our Changes.txt does not mention "\n", so maybe someone secretly added it in the past and forgot to announce.

Khris

Lukey, please clarify how you're getting these Speech Bubbles (which AGS does not have natively) and what exactly fixed the problem for you, because other people might find this thread in the future.

SMF spam blocked by CleanTalk