Code:
=begin
????????????????????????????????????????????????????????????????????????????????
? Actor AutoSelfSwitches ?
? by PK8 ?
? November 8th, 2009 ?
? http://rmvxp.com ?
????????????????????????????????????????????????????????????????????????????????
? ? Table of Contents ?
? ?? Author's Notes - Line 14,15 ?
? ?? Introduction & Description - Line 17?18 ?
? ?? Features - Line 20?21 ?
? ?? This aliases the following... - Line 23,24 ?
????????????????????????????????????????????????????????????????????????????????
? ? Author's Notes ?
? Boredom wins again! ?
????????????????????????????????????????????????????????????????????????????????
? ? Introduction & Description ?
? This script turns on the specified self-switches of actors by default. ?
????????????????????????????????????????????????????????????????????????????????
? ? Features ?
? ? Set which self-switches of actors would turn on at the start of your ?
? project. ?
????????????????????????????????????????????????????????????????????????????????
? ? This aliases the following... ?
? initialize - Game_Party::SelfSwitches ?
????????????????????????????????????????????????????????????????????????????????
=end
#===============================================================================??
# ** Actor AutoSelfSwitches Customization!
#===============================================================================??
class PK8
AASS_Switches = [
# [actorid, id],
[1, 'SwitchA'],
[2, 'SwitchA'],
[3, 'SwitchA'],
[4, 'SwitchA']
]
end
#==============================================================================
# ** Game_Party::Switches
#------------------------------------------------------------------------------
# This handles switches. It's a wrapper for the built-in class "Array."
# The instance of this class is referenced by $game_party.self_switches.
#==============================================================================
class Game_Party::SelfSwitches
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias_method :pk8_actorautoselfvariables_initialize, :initialize
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
pk8_actorautoselfvariables_initialize
PK8::AASS_Switches.each { | k | @data[k] = true }
end
end