Scroll Text

Continuing the tutorials on BB code effects with text I use the x axis of offset to do a scrolling effect.
I'll also show setting up the mesh deform as shown in the video.

As you probably know to create a mesh you right click on the text object and select Create mesh, or Set mesh size if you need to adjust... you probably will.








You'll want to keep the points from pinching the text together too much, again you need to do some adjustments.




Its ok to let the points go off from the layout. In fact it will look like its flowing off the screen if you do. Altering the z can be interesting if you want to experiment.















I added a csv string to an instance variable.
You can set the text to a list of phrases, but you need a counter to do that.





Again I use the Tween behavior to set up  an endless chain of events.







The events:
+ System: On start of layout
-> Audio: Play music_fx_lofi_ambient_ethereal_scales.webm not looping at volume 0 dB (stereo pan 0, tag "lofi")
-> Text: Tween "expresso" value from 0 to -1250 in 4 seconds (Default, destroy: No, loop: No, ping pong: No, repeat count: 1)
-> System: Wait 22 seconds
-> Audio: Fade "lofi" volume to -100 dB over 8 seconds, then stop
Note I didn't use a function this time.
Basically we want to set up an x value that goes from 0 to -1250 over a time of 4 seconds.

+ Text: Is Tween "expresso" playing
-> Text: Set text to "[offsetx="&Text.Tween.Value("expresso")&"]"&tokenat(Text.mystrings, Text.mycount, ",")&""
We use tokenat() of the string in the instance variable(Text.mystrings), and say the variable Text.mycount is the index of the string, and of course a comma is the delimiter.
Then set the x offset in the bbcode to the tweens value.
Every tick.

+ Text: On Tween "expresso" finished
-> Text: Set mycount to (Text.mycount+1)%3
-> Text: Tween "expresso" value from 0 to -1250 in 4 seconds (Default, destroy: No, loop: No, ping pong: No, repeat count: 1)
And set the count to plus one. Then reset it when it gets to 3 using modulus. When the tween finishes.
Restart the tween after.

Find the source here






Comments