# Boolean Variable Rules

Booleans can have only one of two possible values: `true` or `false`.&#x20;

They are commonly used in conditional statements to make decisions based on whether a certain condition is true or false. You can choose the Default Value as either `true` or `false`.

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgll1jjQMRTVj7p6n7g%2Fuploads%2F3AMPge7qpyS6iFvoxrRN%2Fimage.png?alt=media&#x26;token=c10588b1-a9de-411c-90c9-d0ad0c36d5a9" alt=""><figcaption><p>Boolean Variables</p></figcaption></figure>

## Boolean: When Rules

1. **changes**: Gets triggered if the boolean variable undergoes a change.
2. **is TRUE:**  Gets triggered if the boolean variable changes to `true`.
3. **is FALSE:**  Gets triggered if the boolean variable changes to `false`.

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgll1jjQMRTVj7p6n7g%2Fuploads%2F9Ww79nRpm0VDFAAp3Frv%2Fimage.png?alt=media&#x26;token=7251f6b2-f6d4-4db9-9c04-c6a96dafd42f" alt=""><figcaption><p>Boolean: When Rules</p></figcaption></figure>

## Boolean: Then Rules

1. **reset to default value** - This will set the variable back to its default value.
2. **set to true** - Sets the boolean to `true`.
3. **set to false** - Sets the boolean to `false`.
4. **capture data** - This action copies the value from the "When" side of the rule. Check [#capturing-user-input](https://docs.gmetri.com/metaverse/variables/string-substitution#capturing-user-input "mention").

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgll1jjQMRTVj7p6n7g%2Fuploads%2FhRiZ0wRPCXEwL3OMftYH%2Fimage.png?alt=media&#x26;token=cb13830f-37ef-41ef-bf39-bd4947e20ac3" alt=""><figcaption><p>Boolean: Then Rules</p></figcaption></figure>
