# RPG::Event::Page::Condition

## Superclass

* [Object](https://enls.gitbook.io/rgss-reference-manual/standard-library/built-in-classes/object)

## Referrer

* [RPG::Event::Page](https://enls.gitbook.io/rgss-reference-manual/game-library/rpgxp-data-structures/rpg-event-page)

## Attributes

### switch1\_valid

Truth value for whether the first \[Switch] condition is valid.

### switch2\_valid

Truth value for whether the second \[Switch] condition is valid.

### variable\_valid

Truth value for whether the \[Variable] condition is valid.

### self\_switch\_valid

Truth value for whether the \[Self Switch] condition is valid.

### switch1\_id

If the first \[Switch] condition is valid, the ID of that switch.

### switch2\_id

If the second \[Switch] condition is valid, the ID of that switch.

### variable\_id

If the \[Variable] condition is valid, the ID of that variable.

### variable\_value

If the \[Variable] condition is valid, the standard value of that variable (x and greater).

### self\_switch\_ch

If the \[Self Switch] condition is valid, the letter of that self switch ("A".."D").

## Definition

```ruby
module RPG
  class Event
    class Page
      class Condition
        def initialize
          @switch1_valid = false
          @switch2_valid = false
          @variable_valid = false
          @self_switch_valid = false
          @switch1_id = 1
          @switch2_id = 1
          @variable_id = 1
          @variable_value = 0
          @self_switch_ch = "A"
        end
        attr_accessor :switch1_valid
        attr_accessor :switch2_valid
        attr_accessor :variable_valid
        attr_accessor :self_switch_valid
        attr_accessor :switch1_id
        attr_accessor :switch2_id
        attr_accessor :variable_id
        attr_accessor :variable_value
        attr_accessor :self_switch_ch
      end
    end
  end
end
```


---

# 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://enls.gitbook.io/rgss-reference-manual/game-library/rpgxp-data-structures/rpg-event-page-condition.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.
