AutoSelfVariables [Add-on]
#1
AutoSelfVariables
Version: 1

Introduction
This is an add-on to my Self Variables script [VX], [XP]. This is pretty similar to my autoswitcher script. Basically, you get to set initial values of self-variables for certain events on certain maps, which would be set up when your project starts.

Features
  • Set initial self variables values of certain events from certain maps.

Screenshots
No screenshots.

Demo
No demo.

Script
Code:
=begin
????????????????????????????????????????????????????????????????????????????????
? AutoSelfVariables                                                            ?
? 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?22                                ?
? ?? This aliases the following... - Line 24,25                                ?
????????????????????????????????????????????????????????????????????????????????
? ? Author's Notes                                                             ?
? My boredom made me work on this script. :P                                   ?
????????????????????????????????????????????????????????????????????????????????
? ? Introduction & Description                                                 ?
? This script sets initial values of self-variables of events from certain maps?
????????????????????????????????????????????????????????????????????????????????
? ? Features                                                                   ?
? ? Set initial values of self-variables from certain events at certain maps at?
?   the start of your project.                                                 ?
????????????????????????????????????????????????????????????????????????????????
? ? This aliases the following...                                              ?
? initialize          - Game_SelfVariables                                     ?
????????????????????????????????????????????????????????????????????????????????
=end

#===============================================================================??
# ** AutoSelfVariables Customization!
#===============================================================================??
class PK8
  ASV_Variables = {} # Do not touch.
 
  # ASV_Parameters[[map_id, event_id, id]] = value
  ASV_Variables[[1, 1, 'A']] = 1
  ASV_Variables[[1, 2, 'A']] = 5
  ASV_Variables[[1, 3, 'A']] = 10
  ASV_Variables[[1, 4, 'A']] = rand(20)
end

#==============================================================================
# ** Game_SelfVariables
#------------------------------------------------------------------------------
#  This class handles self switches. It's a wrapper for the built-in class
# "Hash." The instance of this class is referenced by $game_self_variables.
#==============================================================================

class Game_SelfVariables
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias_method :pk8_autoselfvariables_initialize, :initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    pk8_autoselfvariables_initialize
    PK8::ASV_Variables.each_pair { | k, v | @data[k] = v }
  end
end

Instructions
Instructions are in the script.

FAQ
Awaiting question.

Compatibility
Aliases initialize of Game_AutoSelfSwitches class.

Credits and Thanks
No one to thank. :p

Author's Notes
How many times do I have to blame boredom for making these scripts?

Terms and Conditions
Credit me. :p
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Actor AutoSelfVariables [Add-on] PK8 0 863 11-09-2009, 05:49 AM
Last Post: PK8



Users browsing this thread: 1 Guest(s)