A Text Box is a rectangular region that contains text. They have a large number of configurable parameters, and support lightweight markup-based formatting.

Image

Font

Text boxes use a provided TrueType font. To ensure that projects always contain all of the data that they depend upon, the font file must be part of the project. You can set the font of a text box by dragging the font file to the Font field in the inspector with the text box selected.

Story Machine supports rendering in Japanese, Chinese, Korean, and other languages. However, to use such languages make sure to provide a font file that contains characters for that language.

When you export a Story Machine game, only the characters used in the Text Database are stored. The original font file is not distributed with your game.

Height

The height, in pixels, of the font. Individual characters (such as a lowercase ā€˜gā€™) may end up being larger than this size if they extend below the baseline or above the X height.

Justification

Setting to control the horizontal alignment of the text (Left, Center, or Right).

Vertical Alignment

Setting to control the vertical alignment of the text within the text box (Top, Middle, Bottom).

Default Color

The default color of the text. Text may change color via tags, see Formatting below.

Type Out Text

When selected, the text box will type out the text displayed within it one character at a time.

Cursor

When using Type Out Text, specifies a game object to be used as a cursor that runs in front of the text as it types out.

Cursor Blink Delay

When using Type Out Text and a valid Cursor object, specifies the delay in seconds between cursor blinks. If set to 0 the cursor will not blink. Blinking enables and disables the cursor object when text printing pauses or reaches the end of a page.

Keystroke Delay

When using Type Out Text, the Keystroke Delay specifies the amount of time (in seconds) to wait between characters. The default is 0.1, but many games will prefer a much faster speed (such as 0.01).

Fade In Text

When selected, the text will fade in. This can be combined with Type Out Text to create text that fades in character by character.

Fade In Speed

When using Fade In Text, this value controls the duration (in seconds) of the fade. When combined with Type Out Text, this value can be used to create a smooth fade in of the text or cause individual characters to fade in rather than just appearing.

Drop Shadow

When selected, the text is given a shadow.

Drop Shadow Color

When using Drop Shadow, this value controls the color of the shadow.

Drop Shadow Angle

When using Drop Shadow, this value controls the direction (in degrees, the 0 degrees pointing towards the top of the screen) that the shadow is cast. The default is 135, which is down-and-to-the-right.

Drop Shadow Offset

When using Drop Shadow, this value controls how many pixels to offset the shadow from the text. Larger values will make the text look like it is floating higher off the surface.

Outline (Experimental)

When selected, the font is drawn with an outline. This feature is a work-in-progress.

Outline Color

When using Outline, this value controls the color of the outline.

Outline Thickness

When using Outline, this value specifies the thickness of the outline.

Key Sound

A sound file to use in conjunction with Type Out Text. Drag a sound file from the project to this box to set it. This sound will be played for every character that is displayed.

Text Name

The name of the text entry to display in the text box. All text in Story Machine is stored in the Text Database and each entry must have a unique name. The Text Name field specifies the name of the text entry to display in the text box. New entries can be created by typing a new name into this field, and existing entries can be selected from the drop-down menu attached to it.

Text

The text to display in the text box, associated with the Text Name field. You can edit the text directly in Story Machine, or edit the Text Database.txt file that Story Machine automatically generates.

Text in text boxes supports formatting and commands via an HTML-like markup syntax. See Text Formatting for reference.