Text visual effects

Get help using Construct 2

Post » Sun May 01, 2016 8:35 am

1. If a sprite text box is set to an exact size can you make the text within that box scroll up or down to reveal more or less.
2. Is there a way to make words fill up a text box over a period of time. (like if someone were typing or like what you see during cut scene conversation.)
B
14
S
3
Posts: 55
Reputation: 912

Post » Sun May 01, 2016 10:08 am

for 2, yes, I did that in my games. See the following from the manual's System Expressions page:

left(text, count)
Return the first count characters of text.

len(text)
Return the number of characters in text.


You could create a variable (let's call it "letterCounter") that keeps increasing by 1 every 0.1 seconds, for instance, you will then put in letterCounter into left(yourTextHere, letterCounter) and put the text returned from this function into the text object or spritefont object using their "set text" action every tick. This will show yourTextHere text character by character at the speed of 1 character per 0.1 seconds.

Tip: for performance reason, text object has very poor performance when it needs its text change every tick. (even on desktop, it kicks your framerate down to the point that makes your computer that can run Crysis 3 on high graphical setting to cry) You may wish to use spritefont instead as there will be no performance impact when you keep on setting the text every tick.

EDIT: oops, sorry, you want TextBox's Set Text action, not Text object:

From https://www.scirra.com/manual/117/textbox :


Set text
Set the text currently entered in to the field.

The idea and what can you do should be the same though.

----------

for 1, anyone else wanna give @currypuff a hand?
Last edited by TwinBlazar on Sun May 01, 2016 10:25 am, edited 2 times in total.
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: http://www.newgrounds.com/portal/view/660664 (use Chrome on Windows for best performance)

My sites:
http://twinblazar.deviantart.com
http://twinblazar.newgrounds.com
https://twitter.com/twinblazar
http://www.pixiv.net/member.php?id=15072448
B
30
S
11
G
11
Posts: 411
Reputation: 8,469

Post » Sun May 01, 2016 10:15 am

for 1, from https://www.scirra.com/manual/117/textbox , I see only this action:

Scroll to bottom
Scroll to the bottom of the control. Only has an effect when set to the textarea type, since it is the only multiline mode. This is useful for chat or log style textareas.


I wonder whether there are other external plugins/methods.
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: http://www.newgrounds.com/portal/view/660664 (use Chrome on Windows for best performance)

My sites:
http://twinblazar.deviantart.com
http://twinblazar.newgrounds.com
https://twitter.com/twinblazar
http://www.pixiv.net/member.php?id=15072448
B
30
S
11
G
11
Posts: 411
Reputation: 8,469

Post » Sun May 01, 2016 12:19 pm

Thanks on solving Q. 2 for me, I've realized if no one can come up with a solution for Q. 1 I could just do a 'next page' button, but it would still be great is someone could figure out how to do Q.1.
Again thanks keroberos.
B
14
S
3
Posts: 55
Reputation: 912


Return to How do I....?

Who is online

Users browsing this forum: moebios and 7 guests