Variable Management
Good to know: Variable management is the same for layer and global variables alike.
Create Variable
You can create a variable by clicking on the + icon of the Custom variable group. Once you choose what information you would like your variable to hold by clicking on the correct menu entry, the variable will appear under the Custom variable group.
![](https://docs.lightact.com/~gitbook/image?url=https%3A%2F%2F3312042618-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F9sVaJpWJhPbmscipukhh%252Fuploads%252FIuiaQhPPwfyp41gjLXuK%252FCreateVariable.gif%3Falt%3Dmedia%26token%3D884b9814-90e4-4446-bb4c-92906edf990d&width=768&dpr=4&quality=100&sign=590cc93&sv=1)
Good to know: You can also create different variable groups by clicking on the Add group button at the bottom of the Layer variables or Global variables collapsible.
Rearrange Variables
You can change the order of a variable within its Variable group by clicking on its icon and dragging it to the spot you want to place it.
![](https://docs.lightact.com/~gitbook/image?url=https%3A%2F%2F3312042618-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F9sVaJpWJhPbmscipukhh%252Fuploads%252FEYvJBcvHr4H1OdGGLQrK%252FDragVariable.gif%3Falt%3Dmedia%26token%3D34fc1004-fcd2-4d9e-af58-a1db61aa2b9d&width=768&dpr=4&quality=100&sign=aa37ed5d&sv=1)
You can also move a variable to another Variable group by dragging from its icon to the collapsible icon of the wanted Variable group.
![](https://docs.lightact.com/~gitbook/image?url=https%3A%2F%2F3312042618-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F9sVaJpWJhPbmscipukhh%252Fuploads%252FhDR52AguHmpvr8y1d08B%252FDragVariableToGroup.gif%3Falt%3Dmedia%26token%3Dd30801f4-7df0-43b2-91fb-4cbb9ac9248a&width=768&dpr=4&quality=100&sign=aa64334b&sv=1)
Delete Variable
You can delete a Variable by clicking on its Trash icon or by right-clicking on the Variable icon and selecting Delete.
![](https://docs.lightact.com/~gitbook/image?url=https%3A%2F%2F3312042618-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F9sVaJpWJhPbmscipukhh%252Fuploads%252FzF1tUEcqBtb5nzIpGW81%252FDeleteVariable.gif%3Falt%3Dmedia%26token%3Dab17408f-6b9c-45a0-bdc0-68415cbd54de&width=768&dpr=4&quality=100&sign=f6784f32&sv=1)
Adjusting Numeric Variables
Every numeric Variable has a setting to limit the minimum and maximum values. You can change it by left-clicking on the property and selecting Min and max setting. Similarly, the drag rate can be adjusted by left-clicking on the dropdown menu.
![](https://docs.lightact.com/~gitbook/image?url=https%3A%2F%2F3312042618-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F9sVaJpWJhPbmscipukhh%252Fuploads%252F5SHa7ySC7nA2NW2coyMI%252F240326-MINMAX.png%3Falt%3Dmedia%26token%3Dc1c06935-3dd0-465e-bd7f-5b51df94bfa0&width=768&dpr=4&quality=100&sign=6bc1ddab&sv=1)
With some variables, you can toggle between appearances. You can do that by right-clicking on the Variable icon and selecting the appearance dropdown menu. You can change the Integer Variable to show As Integer or As Dropdown. This is useful for uniquely naming each integer. Likewise, Float Variables that are used for time and duration, have a similar dropdown menu and can appear As Time or As Float.
Using Variables in Layouts
Drag a Variable on the layout either by dragging and holding shift or ctrl which skips the popup menu, or by dragging and dropping, which brings up a menu where you can select either a Getter or a Setter node.
Getter and Setter Nodes
Getter node is used to get the current value of a variable
Setter node is used to set the current value of a variable
Example of using Global Variables
For example, if 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 window
You can choose from a selection of variables. Let's choose the Float variable for this tutorial.
It is a good practice, to give your variables descriptive names, so let's rename it to Opacity and change its value.
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.
Reference Node Replacement
In LightAct, you have the option to substitute the Getter or Setter node of a specific variable with the Getter or Setter node of another variable.
To do this, drag from the Variable icon of the desired variable to the Reference node you want to substitute.
![](https://docs.lightact.com/~gitbook/image?url=https%3A%2F%2F3312042618-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F9sVaJpWJhPbmscipukhh%252Fuploads%252FKrDmGZsLwIjlRJGiPlUg%252FReplaceNode.gif%3Falt%3Dmedia%26token%3D803ee0d0-5b72-4269-9919-99e8d8fddd2c&width=768&dpr=4&quality=100&sign=1b5b8cf0&sv=1)
Good to know: This can be extremely useful when you copy Reference nodes of Layer variables to other layers in the project.
Last updated