User Tools

Site Tools



Display text from a book file on-screen. Supports multiple pages, color, and auto-scroll. All of the page options are written in the book file. The object only has the parameter page which is the page number that will be shown next.

Like any book, the text is in a STR file with each page in the string page_n. Other options are set for each page using the same name plus an option name. To change the color, add the string page_n_color. The text will stay on-screen for the time specified in page_n_time. When the time is 0 or omitted, then the time is calculated from the length of the text. If page_n_auto is set, the next page will automatically be shown after the time given. The auto-time and display-time run concurrently, so a page that is displayed for two seconds and auto-scrolls in three seconds will display the next page one second after the first is removed from the screen. Usually, the next page is one greater than the current page. The page_n_next string will override this. If the next page can’t be found, then the script will go back to page 0.


The ScriptControl message can change or display a page in more ways than just TurnOn. When the control argument is just a number, the current page will be changed but not displayed. For greater control, use an operator code before the number.

Code Result
@ Set the page without displaying it.
# Set the page then display it.
+ Increment the page counter.
- Decrement the page counter.

The + and - codes will add or subtract the number of pages you specify. You can omit the number to only move one page.

Inherits GenericTrap
Properties Book→Text
Parameters page (integer) Number of the next page to display when turned on.
Strings page_n (string) Text of the page. Cannot be empty. If you want to show a blank page, write " ".
page_n_color (color) Text color.
page_n_time (time) How long to keep the text on-screen.
page_n_auto (time) Automatically display the next page.
page_n_next (integer) Skip to another page after this one.
tnhscript/onscreentext.txt · Last modified: 2010/11/23 00:11 (external edit)