How do I Scroll Text Up

Get help using Construct 2

Post » Tue Sep 06, 2016 8:10 am

Hey there,
I am trying to create a text window that will scroll up when I add a new line of text. Just like what you would see in any games chat window. I know that the TextBox object has an action for this but I can't use a TextBox because I don't want that big white background. How would I go about manually scrolling the text upward on a simple Text or Sprite Font Object?

Thank You,
Posts: 826
Reputation: 17,925

Post » Tue Sep 06, 2016 9:03 am

To add text to an already existing text or spritefont object you can use the append action :
newline & your_text_to_add

This will jump a line at the end of the text object and add your text.
Now the issue is that you may have to resize the object and position it so that it displays only the new text.

So another way is to do the opposite :
Your_text_to_add & newline & Text.text

This way, the new line will always be on top, but on the bottom you won't be able to slide down to see the previous text (the object is not really meant to do that).

As mentioned if you really want to allow for a complete slide, you have to resize the object and then allow it to slide, using possibly some layer mask to keep it in a certain position.

Example of masking and scrolling
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Posts: 7,432
Reputation: 75,388

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 2 guests