> For the complete documentation index, see [llms.txt](https://fast-studios.gitbook.io/press-e/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fast-studios.gitbook.io/press-e/manual/conditions.md).

# Conditions

To make setup **faster and more flexible**, the system can **read/sync variables** (not every type, but the common essentials) from **any script/component** in your scene. Simply **drag the object**, pick the **component**, and then select the **variable**. There are **three main** condition types:

* **Constant** — compares a variable to a **constant value**.
* **Dynamic** — compares **one variable** to **another variable**.
* **Key** — checks whether the player **already has** the key.

To enable **conditions**, open the **Main Tab** at the [**Interactable**](/press-e/manual/components/interactable.md) inspector and turn on the **Conditions** foldout (it’s always the **last** one). When enabled, you’ll see the **“Conditions”** header and the **Add** button. Click **Add** to insert a condition, and repeat to **add multiple** items to the list.

<figure><img src="/files/1fUMCIuVEnsRoujRI0LD" alt=""><figcaption></figcaption></figure>

The **left column** controls the **order** of the condition list. **Between conditions** there’s an **AND/OR** selector that defines how they combine. To **reorder**, use the controls at the **top left** (use the arrows). To **remove** a condition, click the **–** button at the **bottom** **left**.

<figure><img src="/files/mrdKZYJN5TtzopsxxPpH" alt=""><figcaption></figcaption></figure>

## Normal Condition

For a **normal condition** (Constant/Dynamic), the **left column** shows **3 fields**:

* **Read From**: the object that holds the script/component with the target variable.
* **Component**: select the component/script that contains the variable.
* **Variable**: choose the variable to read/observe.

In the **middle**, next to **Variable**, pick the **operator** (available options depend on the variable type). Supported operators:

* `==`, `!=` — **string**, **bool**, **object**, **numbers** (*float*, *int*, *double*, etc.), **Quaternion**, **Vector2**, **Vector3**.
* `>`, `>=`, `<`, `<=` — **numbers**, **Vector2**, **Vector3** *(compares using the vector’s **magnitude**)*.
* `X=`, `Y=` — **Vector2** and **Vector3**.
* `Z=` — **Vector3** only.
* `Contains`, `Starts With,` `Ends With` — **string** only.
* `Is True`, `Is False` — **bool** only.
* `Is Null`, `Not Null` — **object** only.

The **right column** defines **what** the left variable is compared against.

* If **Dynamic** mode is **enabled**, you can **select another variable** on the right side.
* If it’s **disabled**, a **constant value** field of the appropriate type is shown.
* **Note:** depending on the operator (e.g., `Is Null`, `Is True`), the right side **may be hidden** because it isn’t required.

## Key Condition

To set up a [**key**](/press-e/manual/components/key.md) **condition**, click the **key icon button** in the **bottom-right corner** of the condition item. The condition switches to [**Key**](/press-e/manual/components/key.md) mode and shows only:

* **Key Check Method**: **Key Name** | **Specific Key**

Choose **Key Name** to check whether the **provided name** matches **a key already obtained** by the player. Choose **Specific Key** to check whether a **specific `Key` component** (the actual script/object) matches **an obtained key**.
