# 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.

{% hint style="info" %}
A typewriter uses its linked Text Animator **Time Scale** to progress time, you can read more here: [Time Scale](/text-animator-godot/effects/edit-effects/time-scale.md)
{% endhint %}

***

## 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.

### Implementing Typerwriters

You just need to add the `TypewriterByCharacter`  (or `TypewriterByWord`) as a child of the `RichTextLabel` controlled by a TextAnimator. Then link the target TextAnimator to the Typewriter.

<figure><img src="/files/Erpy2vDcrV65Cog5hs8y" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/3ioK97C5mB06ErDYIPv6" alt="" width="395"><figcaption></figcaption></figure>

{% hint style="success" %}
:thumbsup: Now you're ready to start showing text dynamically.
{% endhint %}

***

After adding your typewriter, you can start it as shown below:

### Via Code (Recommended)

Replacing “`tmproText.text = textValue;`” with `typewriter.ShowText(textValue);` in your code.

{% hint style="danger" %}
Please don't miss this step if you're setting the text via code! If you're having issues, take a look at the [Best Practices](/text-animator-godot/other/best-practices.md)
{% endhint %}

***

## Controlling Letters

### Start and Stop Typing

Inside the component’s Inspector you’ll find some options to control how the typewriter start should be triggered:

<figure><img src="/files/PIyGwt7e0IwqsYaMvmDA" alt=""><figcaption></figcaption></figure>

* `Start Typewriter Mode`: tells the typewriter when to start showing letters.

<table><thead><tr><th width="287.6363525390625">Value</th><th>Explanation</th></tr></thead><tbody><tr><td><strong>From Script Only</strong></td><td>The typerwiter can only be started by invoking <code>Typewriter.StartShowingText()​</code></td></tr><tr><td><strong>OnEnable</strong></td><td>The typewriter starts every time the RichTextLabel is set active</td></tr><tr><td><strong>OnShowText</strong></td><td>The typewriter starts as soon as a new text is set (<a href="#showing-text">as explained in the “Showing Text” section</a>)</td></tr><tr><td><strong>Automatically From All Events</strong></td><td>All of the above</td></tr></tbody></table>

{% hint style="success" %}
You can pause the typewriter at any time by invoking typewriter.StopShowingText(), and you can start/resume it by invoking typewriter.StartShowingText().
{% endhint %}

***

{% hint style="info" %}
You can create your own typewriter (read [here](/text-animator-godot/extra-customization-via-c/writing-custom-typewriters-c.md) how to create a custom typewriter via C#) or you can use the built-in one.
{% endhint %}

## Callbacks (Godot Signals)

You can connect Godot Signals that will be triggered based on the typewriter activity (example: when it just ended showing text).

<table><thead><tr><th width="237.6363525390625">Signal</th><th>Explanation</th></tr></thead><tbody><tr><td><code>OnTextShowed</code></td><td>Signal called after the entire text has been shown (<em>if you’ve set “Use Typewriter” to true, it will wait until all letters are shown</em>)</td></tr></tbody></table>

The following below only work if the “**use typewriter**” is set to **true**:

<table><thead><tr><th width="239.45452880859375">Signal</th><th>Explanation</th></tr></thead><tbody><tr><td><code>OnTypewriterStart</code></td><td>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 “OnTextShowed” event <em>(in this case you can use that one instead)</em></td></tr><tr><td><code>OnCharacterVisible(Char)</code></td><td>Called each time a character became visible</td></tr></tbody></table>

{% hint style="info" %}
You can hover the mouse above the typewriter options (e.g. delays) to show some tooltips and extra information!
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.febucci.com/text-animator-godot/typewriter/show-and-hide-letters-dynamically.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
