Dialogue box

Get help using Construct 2

Post » Wed May 22, 2013 11:50 pm

I'm trying to create a dialogue box for a game that records all the conversations that have happened
B
15
S
4
G
1
Posts: 286
Reputation: 1,988

Post » Wed May 22, 2013 11:53 pm

Argh sorry, clicked post too early!

I'm trying to create a dialogue box for a game that records all the conversations that have happened, ideally showing different speakers in different coloured text.

I've been trying to use the Textbox object but can't seem to figure out how to add line breaks - all the text I input just appears on the same line. Do I need to use CSS to do this and how would I do it? Also, is the text box the best tool for this or is there a plugin or something that would work better?
B
15
S
4
G
1
Posts: 286
Reputation: 1,988

Post » Thu May 23, 2013 2:35 am

Have you tried
[code]"String1" & newline & "String2" & newline[/code]
?
B
57
S
20
G
7
Posts: 305
Reputation: 8,779

Post » Thu May 23, 2013 9:09 am

I did - that command works for the Text object but not Textbox (is this a bug?) and I need Textbox for the scrolling & multiple text colours. However, I did find http://www.scirra.com/forum/multiline-textbox_topic48864.html which seems to be what I'm looking for, though I haven't tried it yet. Cheers!
B
15
S
4
G
1
Posts: 286
Reputation: 1,988

Post » Thu May 23, 2013 12:43 pm

Out of interest though, has anyone tried doing anything like I described and is a text box the best thing for it?

Basically I want a scrollable, read-only text field where I can vary font colours from line to line and keep a log of all the dialogue that's been spoken in the game. Sort of like the action and conversation logs in old-timey RPGs. The Text object itself would be ideal (as you can append text and stuff) but if there's a way to make it scrollable, I haven't figured it out yet.
B
15
S
4
G
1
Posts: 286
Reputation: 1,988

Post » Thu May 23, 2013 6:42 pm

newline works in the TextBox. Make sure you have the type set to 'Textarea'.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,000

Post » Mon May 27, 2013 5:40 pm

Hey, sorry to keep asking questions about this, I don't really know anything about CSS! Could someone please tell me how I can change font colours from line to line or even word to word in the Text Box object? Eg:

Billy: Hello.
Bobby: Hello, you.

I think it's possible because I've seen someone use text boxes like this before, I just can't figure it out. Cheers!lolpaca2013-05-27 17:41:38
B
15
S
4
G
1
Posts: 286
Reputation: 1,988


Return to How do I....?

Who is online

Users browsing this forum: dieblume86, Kagubro and 2 guests