> For the complete documentation index, see [llms.txt](https://renownedgames.gitbook.io/ai-tree/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://renownedgames.gitbook.io/ai-tree/nodes/decorators/one-time-execution.md).

# One Time Execution

### Description

Decorator making node run only one time.

**To create it**, right-click on the node and select <mark style="color:purple;">Add Decorator/One Time Execution</mark>.

<figure><img src="https://2203000093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGOxTM7Aj9oiVaIINrEkE%2Fuploads%2FpVoBGR0OhzCxGPZoo7Hg%2FOne%20time%20ex%201.png?alt=media&amp;token=939d3fd9-ecfc-47e2-b413-47aa48e7befb" alt=""><figcaption><p>How to create this decorator</p></figcaption></figure>

This decorator has a number of fields, that are highlighted in picture below.

<figure><img src="https://2203000093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGOxTM7Aj9oiVaIINrEkE%2Fuploads%2FvJUgTFhaP1rnTE14ksXv%2FOne%20time%20ex%203.png?alt=media&amp;token=845b74f4-ab12-492f-94ac-38bdeeef6694" alt=""><figcaption><p>Fields</p></figcaption></figure>

### Fields

| Name                 | Description                         |
| -------------------- | ----------------------------------- |
| Node Name            | Name of node                        |
| Completed State Type | State that is returned on completed |

### Completed State Type

{% tabs %}
{% tab title="Own Last State" %}
Completed state type is the same as last state

<figure><img src="https://2203000093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGOxTM7Aj9oiVaIINrEkE%2Fuploads%2FlrKtbklmHpSPHsWG98iS%2FOne%20time%20ex%202.png?alt=media&amp;token=e29e8d94-a2f1-48a1-8e16-8f1865ae2c97" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Custom" %}
You can specify completed state type

#### Parameters

| Name               | Description     |
| ------------------ | --------------- |
| State On Completed | Number of loops |

#### State On Completed

* Success
* Failure
* Aborted
* Running

<figure><img src="https://2203000093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGOxTM7Aj9oiVaIINrEkE%2Fuploads%2Fwo0oRl57y09dv4jxRPoM%2FOne%20time%20ex%204.png?alt=media&amp;token=767f8011-5abc-4d31-a319-f904b629e59d" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}
