[SOLVED] Text and array.

Just started using Construct 2? Post your questions here

Post » Sun Nov 29, 2015 11:17 am

Hello, a question about texts, why when you press enter a second time the text is not displayed on the screen below the previous ?.

That is, only the first text is displayed, the second should be displayed below the first but does not.

I do not understand that I'm doing wrong.

---------------------

dl.dropboxusercontent.com/u/60803633/test.capx

Write a text, hit enter.
Write another text, and hit enter.

The second text should be added to the array and displayed.
Last edited by The Mnk on Sun Nov 29, 2015 2:49 pm, edited 1 time in total.
B
30
S
13
G
21
Posts: 838
Reputation: 14,656

Post » Sun Nov 29, 2015 11:28 am

Works perfectly if you make your text-object bigger..
It's not high enough to display the line..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Nov 29, 2015 11:50 am

But the function is the same as "AddLog" in the multiplayer pong game.

And the array has the same dimensions as in Example pong.
In the example of pong, the lines are shown each lower than the previous.

What should I do to make the new text appears below the previous?
B
30
S
13
G
21
Posts: 838
Reputation: 14,656

Post » Sun Nov 29, 2015 12:05 pm

Make the text-object bigger, set the height of texto to 125 or something like that..

Your capx is working perfectly fine, but the text can not be displayed, because there isn't enough room in the text-object..
It has nothing to do with the array..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Nov 29, 2015 12:28 pm

I think is actually that part that say "If arrayTextos X size > 5 | pop front on X axis" that would create the effect you want, Mirlas. The idea is that when the text has to many lines already (more than 5) just delete the top one. Try playing with smaller numbers in that command to see what I mean
B
11
S
4
Posts: 20
Reputation: 898

Post » Sun Nov 29, 2015 12:41 pm

pedroRocha wrote:I think is actually that part that say "If arrayTextos X size > 5 | pop front on X axis" that would create the effect you want, Mirlas. The idea is that when the text has to many lines already (more than 5) just delete the top one. Try playing with smaller numbers in that command to see what I mean


As I said before, the capx works perfectly fine..
When more than 5 texts are entered one is popped and 5 lines remain..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Nov 29, 2015 2:48 pm

Ok, solved.
The problem was that the text object must have more height to display more lines.
Yes, 5 is the number of lines that can be displayed at once.
Thanks guys!.
B
30
S
13
G
21
Posts: 838
Reputation: 14,656


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest