You can support the development on the Github Sponsors page.


Tech > SCROLLING TEXT V2


The second version of scrolling text script
made by LegoDinoMan
uploaded by LegoDinoMan
added:
updated:
download cartridge
- CLICK TO PLAY -

0


The function get_text_height, which takes in the text to be displayed and splits it into individual lines while also calculating the height of the text in pixels.

The function does this by creating an empty table to store the individual lines and then iterating through each line of text using the gmatch method. The height is then calculated based on the number of lines and returned.

The function scroll_text, which sets the text to be displayed, gets the height of the text, calculates the time elapsed, sets the speed and color of the text, sets the starting position for the text, and then prints the text on the screen with a scrolling effect.

A simple yet effective way to display scrolling text on the screen with customizable text, speed, and color.


Post comment