Using newline in a text variable

Get help using Construct 2

Post » Wed Dec 04, 2013 5:38 pm

I'm not sure what outcome you are getting, but looking at the first post, Variable2 would be correct. If you're outcome is that you are only seeing "first line" with no second line, then you should try resizing your Text objects' height in the layout editor or in an event!
B
51
S
20
G
10
Posts: 571
Reputation: 9,819

Post » Wed Dec 04, 2013 5:50 pm

Thanks @Jase00
I also shared a capx
You can see that all texts height are 281 pixels. So they're long enough to carry another line of texts.
B
21
S
8
G
6
Posts: 177
Reputation: 8,134

Post » Wed Dec 04, 2013 6:05 pm

Oh, I see what the problem is now! I tried the Alt code (Alt+013) for newline directly in the editor but that didn't work. I don't think this will really be rectifiable.
If I had to give a piece of advice when working with large amounts of text, it would be to write it all in a .txt and load it into the "Files" section of your project and call on it when you need to read text (I haven't really done this before, but Ashley has advised it on people before when handling text)
Either that, or have a ' Start Of Layout> Set Variable 1 to "firstline"&newline&"secondline" '.
Hope I was of help!
B
51
S
20
G
10
Posts: 571
Reputation: 9,819

Post » Wed Dec 04, 2013 6:15 pm

[QUOTE=mrcgkh] I mean it's not practical.
For example you want to save 100 different values in an array. You need 100 different actions. But you can create a one text variable and read any value with tokenat[/IMG][/QUOTE]

Not really 100 actions. More like 1 event and action:
mindfaQ2013-12-04 18:15:40
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Post » Wed Dec 04, 2013 7:46 pm

Thanks for everyone. I found a solution

B
21
S
8
G
6
Posts: 177
Reputation: 8,134

Post » Wed Dec 04, 2013 8:12 pm

I liked that solution, @mindfaQ .
Thiago Rocha
[email protected]
B
17
S
4
G
5
Posts: 41
Reputation: 4,269

Previous

Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 5 guests