> For the complete documentation index, see [llms.txt](https://malbersanimations.gitbook.io/animal-controller/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://malbersanimations.gitbook.io/animal-controller/how-to-ac/modify-with-stat.md).

# Modify the controller with a Stat

Check this 3 Samples on how to Modify different behaviours of the AC with different [Stats](/animal-controller/global-components/stats.md)

{% tabs %}
{% tab title="✔Stamina Stat" %}
Let's *disable* the **Sprint** on the **animal** when the **Stamina** gets below 10. and *enable* it back when the Stamina is over 15.

* Select the Stamina Stat on the Stats Component and search for the Event Section:

![](/files/-M-zr7_Bsx3zEz4QuAuk)

* On the **Below** and **Above** Section, Set Below=**10** and Above = **15**.
* On the **Event On Stamina Below 10,** Add a new Listener and Use MAnimal > UseSprint = False
* On the **Event On Stamina Above 15,** Add a new Listener and Use MAnimal > UseSprint = True

![](/files/-M-zrHXpwMxi2quCCgst)

That way when the Stamina will disable the Use Sprint Parameter on the Animal in case it gets below 10 and it will enable it back when is above 15.

#### Now we need to Start **degenerating** the **Stamina** when the Sprint is true on the Animal.

We can do this by using the **On Sprint Enable**  Event on the Animal.

* Create 2 Listeners on the Event.
* On the 1st Listener use Stat > Stat\_Pin(StatID)
* On the 2nd Listener use Stat > Stat\_Pin\_Degenerate(bool) \**Dynamic Bool*

![](/files/-M-ztILKr5hF--ydAlMZ)

That way every time we use the sprint .. the Stamina Stat will degenerate.. and when we release the sprint the Stamina Stat will stop degenerating.
{% endtab %}

{% tab title="Health Stat" %}
\<Finish it Here>

{% endtab %}

{% tab title="Mana Stat" %}
Make the sample with the dragons
{% endtab %}
{% endtabs %}
