Show and hide letters dynamically

You can use Typewriters to show and hide letters dynamically, choosing different pauses for any kind of characters (punctuation, letters, […]), trigger events and more.

circle-info

A typewriter uses the Animated Text Block widget's Time Scale to progress time, you can read more here: Time Scale


Showing Text

There are different types of typewriters, for example “By Character” which shows one letter after the other, or “By Word” which progresses text word after word.

After choosing which Typewriter to use (which means: after selecting it in the Typewriter variable of the Animated Text Block widget), you can start it in two main ways:

Replacing, for example,

TextBlock->Text = TextValue;” with “AnimatedTextBlock->Typewriter->ShowText(TextValue);” in your code.

triangle-exclamation

B) Via the “Easy Integration”

Enabling the “Typewriter Starts Automatically” option in the Animated Text Block details (p.s. this was previously called “Easy Integration”). This will let the plugin automatically check for text changes and start the typewriter based on it.


Controlling Letters

Start and Stop Typing

Among the typewriter properties, you’ll find some options to control how the typewriter start should be triggered:

  • Start Typewriter Mode Flags: tells the typewriter when to start showing letters.

Value
Explanation

From Script Only

The typerwiter can only be started by invoking Typewriter->StartShowingText()

OnConstruct

The typewriter starts as soon as the widget is constructed

OnShowText

The typewriter starts as soon as a new text is set (as explained in the “Showing Text” section)

Automatically From All Events

All of the above

  • Reset Typing Speed At Startup: true if you want the typewriter’s speed to reset back to 1 every time a new text is show, otherwise it will save the last one used.

circle-check

Skip the Entire Text

To Skip the entire typewriter, you can invoke the Typewriter->SkipTypewriter() method.

You can also find a few options to control how it behaves:

  • Hide Appearances On Skip: true if you want to prevent appearance effects from playing whenever the typewriter skips (meaning that the text will be shown instantly).

  • Trigger Events On Skip: true if you want to trigger all remaining events once the typewriter skips (be careful with that if you’re running some game logic with them, as everything will be run at once). Read more about events here: Trigger Events when typing

Skip Specific Parts of the Text

You can use the "<notype>" tag to skip the typewriter under specific sections of the text. For example "Hello <notype>I am shown instantly</notype> and now I'm typing normally again."

circle-check

Hiding Text

You can hide letters dynamically via script, by invoking Typewriter->StartDisappearingText(), and you can also stop it at any time by invoking Typewriter->StopDisappearingText(). Note: update docs links.

You can also test this in the editor through dedicated controls in the section of the AnimTextBlock details called "Preview Effects".


circle-info

You can create your own typewriter (read here how to create a custom typewriter via C++) or you can use the built-in one.

Options

Typewriters might share the same settings and also have specific ones, so be sure to hover the mouse cursor above their fields in the Details window to show the tooltips for each one.

Here is a quick overview of the most important/common ones:

Callbacks (Delegates)

You can use Unreal Delegates that will be triggered based on the typewriter activity (example: when it just ended showing text).

Delegate
Explanation

FOnTextShowed

Delegate called after the entire text has been shown (if you’ve set “Use Typewriter” to true, it will wait until all letters are shown)

FOnTextDisappeared

Called as soon as the typewriter starts hiding the last letter

The following delegates below only work if the “Use Typewriter” is set to true:

Event
Explanation

FOnTypewriterStart

Called right before the typewriter starts showing its first letter. It doesn’t work if the typewriter is off, since it would coincide with the FOnTextShowed delegate (in this case you can use that one instead)

FOnCharacter(FString Char)

Called each time a character became visible

FOnMessage(FEventMarker Marker)

Invoked every time the typewriter meets a message/event in text. Read more about events here

circle-info

You can hover the mouse above the typewriter options (e.g. delays) to show some tooltips and extra information!