Description in the code.
Code:
class Improved_BD
This is a improved bd that the game will acces later.
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
attr_reader :crit_rate
def initialize
# Create crit rate array
@crit_rate = []
define_crit_rate
end
def define_crit_rate
actors = []
classes = []
weapons = []
armors = []
game_variables = []
#----------Define your values here/Define los valores aqui------
# By actor/Por personaje
actors[1] = 5
# By class/Por clase
classes[1] = 66
# By weapons/Por armas
weapons[1] = 19
# By armors/Por armadras
armors[1] = 1
# Game variables
#game_variables.push(ID)
#---------------------------------------------------------------
@crit_rate.push(actors)
@crit_rate.push(classes)
@crit_rate.push(weapons)
@crit_rate.push(armors)
@crit_rate.push(game_variables)
end
end
In scene Title:
# Make each type of game object
$improved_bd = Improved_BD.new
Then i look for the stored information:
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Calculate critical rate/Calcular critico
#--------------------------------------------------------------------------
def crit_rate
var = super()
# Check everytime that the value exist
if $improved_bd.crit_rate[0[@actor_id]] != nil
var += $improved_bd.crit_rate[0[@actor_id]]
end
The error(line63) im having is that it tells me that is an array and not a fixnum, why?