> For the complete documentation index, see [llms.txt](https://tkkoi-developer.gitbook.io/tkkoiassets/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tkkoi-developer.gitbook.io/tkkoiassets/top-down-rogue-like-engine/functionality/ui/floating-text.md).

# Floating Text

A system for displaying floating text above objects - damage, heals, currency. Configured via ScriptableObject rules without changing code.

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

{% hint style="danger" %}
Works only with objects that have a Health component or objects associated with coin pickup!
{% endhint %}

### How to add?

{% stepper %}
{% step %}

### Let's add a FloatingTextSpawner component for the player, for example

<figure><img src="/files/CpIABF1Q5bYOYk9JPaY0" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Now let's add rules for displaying text when any of the 4 actions occur - receiving damage, regeneration, picking up coins, or chasing coins

<figure><img src="/files/N5MUsMHnMbhzWrSkaHrx" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Configure a Scriptableobject for the rule&#xD;

<figure><img src="/files/gMLnwtM29yZXULohtLyl" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### If you need to create new settings, for example, different colors for enemies, you can do it here&#xD;

<figure><img src="/files/QoxxhjEM4WaV3q58kgpX" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### For quick testing, you can run the game and test this using the Health component.

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

### &#xD;

{% endstep %}
{% endstepper %}
