#==============================================================================
# ** Auto-Erase Event
#------------------------------------------------------------------------------
# SephirothSpawn
# Version 1.0
# 2008-09-03
#------------------------------------------------------------------------------
# * Description :
#
# This script was designed to allow you to erase an event permanetly setting
# one self-switch. Rather than setting a self-switch, creating a new page
# and setting the condition the switch is on, you can now just turn on the
# switch and the page is auto-erased.
#
# Please note that by default, this script is configured to use the local
# switch D for all events (D can be changed). This can make any event
# system that uses the local switch D error.
#------------------------------------------------------------------------------
# * Instrucions :
#
# Place the script below the SDK (if included) and above main.
#
# Change the constant to which self-switch will erase the event. 'A'-'D'
#------------------------------------------------------------------------------
# * Terms & Conditions :
#
# Copyright (C) 2007 SephirothSpawn (Timothy Hoffman)
# Free for non-commercial and commercial use.
#==============================================================================
#==============================================================================
# ** SDK Log
#==============================================================================
if Object.const_defined?(:SDK)
SDK.log('Auto-Erase Event', 'SephirothSpawn', 1.0, '2008-09-03')
end
#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------
if Object.const_defined?(:SDK) && !SDK.enabled?('Auto-Erase Event')
#==============================================================================
# ** Game_Event
#==============================================================================
class Game_Event
#--------------------------------------------------------------------------
# * Auto-Erase Constant
#--------------------------------------------------------------------------
Auto_Erase_Self_Switch = 'D'
#--------------------------------------------------------------------------
# * Alias Method
#--------------------------------------------------------------------------
alias_method :seph_autoeraseevent_gmevt_refresh, :refresh
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# Gets self-switch key
key = [@map_id, @id, Auto_Erase_Self_Switch]
# Erase if Self-Switch key on
@erased = true if $game_self_switches[key]
# Original Refresh
seph_autoeraseevent_gmevt_refresh
end
end
#------------------------------------------------------------------------------
# * End SDK Enable Test
#------------------------------------------------------------------------------
end