> For the complete documentation index, see [llms.txt](https://enls.gitbook.io/rgss-reference-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enls.gitbook.io/rgss-reference-manual/game-library/rpgxp-data-structures/rpg-event-page-condition.md).

# RPG::Event::Page::Condition

## Superclass

* [Object](/rgss-reference-manual/standard-library/built-in-classes/object.md)

## Referrer

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

## 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
```
