# Sequential

## Overview

![The Sequential Node.](https://4267723012-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOEts3pBau6LMamSYhGZp%2Fuploads%2Fgit-blob-5b1c4f4373427da1a2e1c25a80aa4b7054e8a5e6%2Fsequentialupdatedimage.png?alt=media)

The **Sequential Node** generates a user-defined number of **Output Pulses**, and executes their **Logic** sequentially (one after the other), with the top-most **Pulses** being executed first. The one caveat to this is that if any **Nodes** that pause or delay the flow of **Logic** are used, they will only affect that particular **Branch**, not the other **Output Pulses** (See **Execution Order** below).

They are used primarily as a means of grouping and organizing blocks of **Logic** with a similar or combined purpose into a more visually readable way.

[**Scope**](https://docs.incari.com/incari-studio/2022.2/overview#scopes): **Project**, **Scene**, **Function**, **Prefab**.

## Attributes

![The Sequential Node Attributes.](https://4267723012-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOEts3pBau6LMamSYhGZp%2Fuploads%2Fgit-blob-d9abfb275ceb843f20849f7f5d354b8ab7e4d74a%2Fsequentialattributes.png?alt=media)

### Outputs

| Attribute     | Type    | Description                                                            |
| ------------- | ------- | ---------------------------------------------------------------------- |
| `Pulse Count` | **Int** | The number of **Output Pulses** that will be executed in the sequence. |

## Inputs

| Input             | Type      | Description                                                           |
| ----------------- | --------- | --------------------------------------------------------------------- |
| *Pulse Input* (►) | **Pulse** | A standard input **Pulse**, to trigger the execution of the **Node**. |

## Outputs

| Output      | Type      | Description                                                                                                                                  |
| ----------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `Pulse [n]` | **Pulse** | A **Pulse** which is executed sequentially from top-to-bottom. The total number of **Pulses** is defined in the `Pulse Count` **Attribute**. |

## Execution Order

### Example 1

![](https://4267723012-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOEts3pBau6LMamSYhGZp%2Fuploads%2Fgit-blob-d2a97a8032ac0069101f64b3f8f5a25ab733e2e6%2Fsequential-execution-order-normal.png?alt=media)

Here, we output three written numbers to the console, using the **Sequential Node**. As one might expect, the numbers are shown immediately after one another, in the correct order:

```
One   [0 seconds]
Two   [0 seconds]
Three [0 seconds]
```

### Example 2

![](https://4267723012-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOEts3pBau6LMamSYhGZp%2Fuploads%2Fgit-blob-a41f48138cd8db35e91bde9a0a60b181a2e49ae6%2Fsequential-execution-order-timeout-01.png?alt=media)

When we add a **Start Timeout Node**, which delays the execution of **Branch**, one might expect the numbers to be output in order, with a delay between "One" and "Two". This, however, is not the case, as **Timeout Nodes** only affect the **Branch** that they are on. You will instead see the following output, exactly as before:

```
One   [0 seconds]
Two   [0 seconds]
Three [0 seconds]
```

### Example 3

![](https://4267723012-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOEts3pBau6LMamSYhGZp%2Fuploads%2Fgit-blob-fa0561786fbf0a5e1926bdfbff444d26ffd70ec5%2Fsequential-execution-order-timeout-02.png?alt=media)

This becomes much clearer, when we insert a **Start Timeout Node** *before* the **Console Node** is executed. Now we see that "Two" and "Three" are shown immediately, whereas "One" is output to the console after the given time has elapsed.

```
Two   [0 seconds]
Three [0 seconds]
One   [1 second]
```
