rey meustrus
Sponsor
What I did with making a battler is basically this:
I did not actually provide for calling setup_battler; not sure where it does get called, actually. Just went into the project to find it, the only place I used it is in Scene_Title:
Because, since I only have one party member, ever, I'm getting rid of $game_party and migrating all its functions to Game_Battler (also getting rid of the Actor/Enemy distinction, but I've made sure all the functions I just gave you correlate to the default script setup)
Code:
class Game_Character
attr_accessor :battler
def initialize
[..]
@battler = Game_Battler.new
end
end
class Game_Event
def setup_battler #In the event name, make [xx] where xx is the two-digit index of the battler
if @event.name =~ /\[[ ]*([00-99]+)\]/i
@battler = Game_Battler.new($1)
end
end
end
class Game_Player
#--------------------------------------------------------------------------
# * Setup Battler : Connect Battler to Player
#--------------------------------------------------------------------------
def setup_battler
@battler = $game_party.actors[0]
end
end
Code:
#-------------------------------------------------------------------------- #****
# * Command: New Game : Party Setup
#--------------------------------------------------------------------------
def commandnewgame_partysetup
# Set up initial party
$game_player.setup_battler
end