# Order of Node Execution

Let's say that you are using *Tick node* as your Lifeline generator. You’ll see that it has only one *Lifeline* output which is executed every frame.

![](/files/l5jhASuU8vF2WSUnHWyY)

<div align="left"><img src="/files/k8hjFZzVzDvFNCkK86Go" alt=""></div>

The order is as follows:

1. LightAct will execute the node connected to the **Tick** node
2. In order to execute it, it will execute all the sub-chains connected to this node.
3. When it's done with step 2, it will look for the next node connected with the lifeline and so on
4. The layer execution ends when all connected nodes are executed. Non-connected nodes are not executed.

You can also split *Lifeline* node by using conditional nodes or delay its execution and so on. There are many ways you can play with how a particular layout is executed. For example, the layout below renders a red 400 x 400 px square on a canvas at different positions depending on the value of the **Input** boolean in the **If node**.

<div align="left"><img src="/files/eAbVyq4clNoYlb5SPP4z" alt=""></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lightact.com/layers-and-layouts/layer-layouts/nodes/order-of-node-execution.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
