How do I Create a Chat Window

Get help using Construct 2

Post » Tue Sep 06, 2016 10:42 am

Hey there,
My goal is to create a log of sorts that holds notifications of certain events, player damage, monster deaths, chat, etc. Unfortunately the way I can seem to get the scrolling window is by using a TextBox. More specifically, I want to know if it's possible to edit this bulky ugly white box into something more appealing to the eyes? I mean this really can't be our only option for scroll-able text, is it?

Thank You,
Stephen
B
56
S
15
G
13
Posts: 826
Reputation: 17,675

Post » Tue Sep 06, 2016 10:48 am

I'm thinking about a mask covering the bottom of the textbox, then when the textbox has appended a new line it will go slightly (character height) under so it is covered but seems like nothing was written, then tween it upwards with LiteTween?
B
9
S
3
Posts: 153
Reputation: 1,272

Post » Tue Sep 06, 2016 10:59 am

B
9
S
3
Posts: 153
Reputation: 1,272

Post » Tue Sep 06, 2016 5:20 pm

@CloveltOc
Loving it so far. Unfortunately once the text window is full it stops scrolling up. Know how to fix this?
B
56
S
15
G
13
Posts: 826
Reputation: 17,675

Post » Tue Sep 06, 2016 5:52 pm

Sorry for the late response! Just set the text box's height to 144 to match the correct line-object height ratio.
B
9
S
3
Posts: 153
Reputation: 1,272

Post » Tue Sep 06, 2016 6:03 pm

Nevermind, didn't read what your issue was correctly.

New .capx!
https://www.dropbox.com/s/ktfm9hd2f7j28 ... .capx?dl=0
B
9
S
3
Posts: 153
Reputation: 1,272

Post » Tue Sep 06, 2016 9:43 pm

@CloveltOc
Sorry, but I still don't understand how it works and how I can control it. I would like the text to scroll upwards, not down. As well, the first line of text stays at the top. How do I get it to scroll away with the rest of the text?
B
56
S
15
G
13
Posts: 826
Reputation: 17,675

Post » Wed Sep 07, 2016 8:22 am

Well, @Tekniko, my idea was to build a foundation so you could understand how to make one that fits your needs, but if it is not clear enough:
The text is constantly lerping towards its origin, but when a new line is appended the text's Y is instantly added the height of a line (in pixels), so even though a new line has been appended, it seems like nothing has changed. The text will lerp towards its origin, and the new line will be uncovered from the mask, that uses substract out (erases all beneath).

No idea why it wasn't scrolling properly when it's vertical allignment was the bottom, but basically all I did to fix it is change it to top and the lerp value. I really can't see where the complicated part is. What do you mean with " the first line of text stays at the top" ? if you add to the append action &time, you can see that is is always scrolling. Again, I changed the vertical allignment only as an example, you can tamper with it all you want.
B
9
S
3
Posts: 153
Reputation: 1,272

Post » Thu Sep 08, 2016 9:04 pm

Hey @cloveltoc,
I put all my questions and thought process into a video. Easier to understand.
Questions
B
56
S
15
G
13
Posts: 826
Reputation: 17,675

Post » Fri Sep 09, 2016 9:30 am

Look at what is being set at the beginning. It's the mask! It covers the text at the bottom of the bg object so it gives that smooth effect.
I don't even know why when the vertical allignment is in the bottom the text doesn't go on. Tried a few things, but came up with a rather hacky solution that works well no matter how fast you spam it!

https://www.dropbox.com/s/ktfm9hd2f7j28 ... .capx?dl=0

Also, no condition = every tick
B
9
S
3
Posts: 153
Reputation: 1,272

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 30 guests