Code:
#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
# A battler class with methods for sprites and actions added. This class
# is used as a super class of the Game_Actor class and Game_Enemy class.
#==============================================================================
class Game_Battler < Game_BattlerBase
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :speed # action speed
attr_accessor :var1 # not real variable name
attr_accessor :var2 # not real variable name
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
@battler_name = ""
@battler_hue = 0
@actions = []
@speed = 0
@result = Game_ActionResult.new(self)
@last_target_index = 0
@guarding = false
@var1, @var2 = 0
# var2 is nil somehow, why?
msgbox(var2) # Debugging to get var2 value
clear_sprite_effects
super
end
Why is var2 nil? I serious can't find what is wrong and its extremely frustrating.
By the way: I changed the variable names for posting, it isn't the problem. This is a patch that overrides or adds the the Game_Battler class.
Edit: Nevermind, I figured it out.
Code:
# Separate these variables
@var1 = 0
@var2 = 0