> For the complete documentation index, see [llms.txt](https://docs.febucci.com/text-animator-unreal/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.febucci.com/text-animator-unreal/customization/extra-customization-via-c++-blueprints/writing-custom-actions-blueprints.md).

# Writing Custom Actions (Blueprints)

Other than using [built-in actions](https://docs.febucci.com/text-animator-unity/typewriter/wait-actions-when-typing), you can create your own via Blueprints.

***

## Actions Base Class <a href="#actions-base-class" id="actions-base-class"></a>

When creating a new Blueprint class, inherit from `ActionActorBase` . Actions are essentially Actors that get spawned when needed, execute their logic and then get destroyed automatically.

<figure><img src="/files/peMbXxn5DV4m1wHzlPfy" alt="" width="563"><figcaption></figcaption></figure>

### DoAction Method <a href="#doaction-method" id="doaction-method"></a>

Then, all you need to do is overriding the “DoAction” method and write your code inside it.

Remember that actions **pause** the typewriter until they’re completed (for example, waiting for player input or until time has passed).

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

* The `ActionMarker` inherited variable has useful info about your tag, for example the ID or if there are any parameters that come with it (e.g. `<playSound=02>`).
* The inherited `TypewriterRef`  references the component that is currently performing the action. It contains all relevant information about the current typing status.

{% hint style="warning" %}
**IMPORTANT!** Remember to use the "**Complete Current Action**" node once your action is finished, as shown in the screenshot, to signal the typewriter to resume typewriting, **or it will be left stuck in pause**.
{% endhint %}

## Action Object Base Data Asset

To effectively use your Custom Action you need to create a Data Asset that uses the newly created Blueprint class.&#x20;

To do so, go into your Content Browser->Miscellaneous->Data Asset->Action Object Base.&#x20;

<figure><img src="/files/YY37pcWcdPpSCJ45Ws2h" alt="" width="563"><figcaption><p>Newly created Custom Action Data Asset</p></figcaption></figure>

* `Tag ID`: is the string you will use inside your "**Animated Text Block**" to trigger your action.
* `Action Actor Class`: is the actual Blueprint class extending `ActionActorBase`.

{% hint style="info" %}
Remember to add this newly created Data Asset to the proper database in your "**Content/Plugins/TextAnimatorFebucci/Data**" folderc
{% endhint %}

***

### ✅ Done! <a href="#done" id="done"></a>

Done! With this simple procedure, you can add any Custom Action you want.
