# Variable

Nodes for working with **variables** — the named values your scene keeps and reuses, each holding a number, a piece of text, or a time.

### Cast Variable

Checks whether a variable holds the kind of value you expect, and only passes it along when it does.

#### What it does

A variable can hold different kinds of values — a number, some text, or a time. This node looks at the variable you give it and compares its actual kind to the kind you pick in **SubType**. If they match, you get the same variable back, unchanged. If they don’t match, you get nothing back.

Think of it as a safety check: it lets a value continue only when it is the type you were counting on. It never changes the original variable — it simply hands the same value through, or holds it back.

#### Inputs

<table id="bkmrk-port-type-what-to-co"><thead><tr><th style="white-space: nowrap;">Port</th><th style="white-space: nowrap;">Type</th><th>What to connect</th></tr></thead><tbody><tr><td style="white-space: nowrap;">**Execute**</td><td style="white-space: nowrap;">Trigger</td><td>Wire this from the previous node’s Execute output.</td></tr><tr><td style="white-space: nowrap;">**Variable**</td><td style="white-space: nowrap;">Variable</td><td>The variable you want to check.</td></tr><tr><td style="white-space: nowrap;">**SubType**</td><td style="white-space: nowrap;">Choice</td><td>The kind of value you expect the variable to hold. Pick `Number`, `String` (text), or `Time`.</td></tr></tbody></table>

#### Outputs

<table id="bkmrk-port-type-what-you-g"><thead><tr><th style="white-space: nowrap;">Port</th><th style="white-space: nowrap;">Type</th><th>What you get</th></tr></thead><tbody><tr><td style="white-space: nowrap;">**Execute**</td><td style="white-space: nowrap;">Trigger</td><td>Fires once the node has finished.</td></tr><tr><td style="white-space: nowrap;">**Variable**</td><td style="white-space: nowrap;">Variable</td><td>The same variable, passed straight through when its kind matches the chosen SubType. If the kind does not match, you get nothing here.</td></tr></tbody></table>

#### Example

<table id="bkmrk-variable-input-a-var"><tbody><tr><td>**Variable** input</td><td>A variable holding `42`</td></tr><tr><td>**SubType** input</td><td>`Number`</td></tr><tr><td>**Variable** output</td><td>The same variable holding `42` (the kinds match). Had you chosen `String` instead, nothing would come out.</td></tr></tbody></table>

#### Tips

- Use this before a step that only makes sense for one kind of value — the value continues only when it is the type you picked.
- This node checks the kind of value; it does not convert it. A number stays a number — it is simply allowed through or held back.