RPG::CommonEvent

The data class for common events.

Superclass

Attributes

id

The event ID.

name

The event name.

trigger

The event trigger (0: none, 1: autorun; 2: parallel).

switch_id

The condition switch ID.

list

A list of event commands. An RPG::EventCommand array.

Methods

autorun?

Determines whether the event is an autorun event. Returns true if the value of the trigger is 1.

parallel?

Determines whether the event is a parallel event. Returns true if the value of the trigger is 2.

Definition

class RPG::CommonEvent
  def initialize
    @id = 0
    @name = ''
    @trigger = 0
    @switch_id = 1
    @list = [RPG::EventCommand.new]
  end
  def autorun?
    @trigger == 1
  end
  def parallel?
    @trigger == 2
  end
  attr_accessor :id
  attr_accessor :name
  attr_accessor :trigger
  attr_accessor :switch_id
  attr_accessor :list
end