class Window_stats_Pokemon < Window_Selectable
def initialize(actor_index = nil)
super(320, 96, 320, 384)
self.contents = Bitmap.new(width - 32, height - 32)
if actor_index != nil
@actor = $game_party.actors[actor_index]
else
@actor = nil
end
refresh
self.active = false
self.z = 99
end
def refresh
self.contents.clear
if @actor != nil
draw_actor_name(@actor, 0, 0)
draw_actor_class(@actor, 0, 32)
draw_actor_parameter(@actor, 0, 128, 0)
draw_actor_parameter(@actor, 0, 160, 1)
draw_actor_parameter(@actor, 0, 192, 2)
draw_actor_parameter(@actor, 0, 224, 3)
draw_actor_parameter(@actor, 0, 256, 4)
draw_actor_parameter(@actor, 0, 288, 5)
draw_actor_parameter(@actor, 0, 320, 6)
end
end
end
#==============================================================================
# ** Scene_Status
#------------------------------------------------------------------------------
# This class performs status screen processing.
#==============================================================================
class Scene_Status
#--------------------------------------------------------------------------
# * Object Initialization
# actor_index : actor index
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
#make Command Window
s1 = "Stats"
s2 = "Skill"
@command_window = Window_Command_pokemon.new([s1, s2])
if $game_party.actors.size == 0
# Disable items, skills, equipment, and status
@command_window.disable_item(0)
@command_window.disable_item(1)
end
# Make status window
@status_window = Window_MenuStatus.new
@stat_window = Window_stats_Pokemon.new
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of windows
@command_window.dispose
@status_window.dispose
@stat_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update windows
@command_window.update
@status_window.update
@stat_window.update
# If command window is active: call update_command
if @command_window.active
update_command
return
end
# If status window is active: call update_status
if @status_window.active
update_status
return
end
if @stat_window.active
update_stat
return
end
end
def update_command
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to map screen
$scene = Scene_Menu.new
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# If command other than save or end game, and party members = 0
if $game_party.actors.size == 0 and @command_window.index < 4
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Branch by command window cursor position
case @command_window.index
when 0 # status
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Make status window active
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 1 # skill
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Make status window active
@command_window.active = false
@status_window.active = true
@status_window.index = 0
end
return
end
end
#--------------------------------------------------------------------------
# * Frame Update (when status window is active)
#--------------------------------------------------------------------------
def update_status
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Make command window active
@command_window.active = true
@status_window.active = false
@status_window.index = -1
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0 # status
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to status screen
@status_window.active = false
@stat_window.active = true
@stat_window = Window_stats_Pokemon.new(@status_window.index)
@stat_window.z = 200
when 1 # skill
# If this actor's action limit is 2 or more
if $game_party.actors[@status_window.index].restriction >= 2
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to skill screen
$scene = Scene_Skill.new(@status_window.index)
end
return
end
end
def update_stat
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Make command window active
@status_window.active = true
@stat_window = Window_stats_Pokemon.new
@stat_window.z = 99
@stat_window.active = false
return
end
end
end
in the Status screen if I press status in the command window and then select and actor the window underneath pops up and displays stats every thing up to there works
but if I press b while the stat screen is up nothing happens the menu basically freezes because the stat window is active and cant be cancled and I cant figure out why... any help so I can finish this guys menu?