# Global variables

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

We can access and manage *Global variables* collapsible from every **Layer Layout** window.

<div align="left"><figure><img src="/files/3ST8NoLSKqva48U7J2Wv" alt=""><figcaption></figcaption></figure></div>

Alternatively, Global variables can also be accessed from the **Global variables** window.

{% hint style="info" %}
**Good to know**: Global variables are accessible throughout the program which makes them ideal for global show control and data transfer between layers.
{% endhint %}

## Example of using Global variables

Let's say we want to control the opacity of two video layers with just one global variable we create one by pressing the + icon in the **Global variables** section.

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

You can choose from a selection of variables. Let's choose a Float variable for this tutorial.

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

It is a good practice, to give your variables descriptive names, so let's rename it to *Opacity* and change its value.

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

Now when we open another video layer we can see that under **Global Variables** there is the *Opacity* float variable we created on another layer with the same values.

<div align="left"><img src="/files/Q9EJfBkzDQF0ZuIJsfgS" 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/variables/global-variables.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.
