Whenever I try to change to my SubMenu it shows:
http://www2.mediafire.com/imgbnc.php/55a31f9a353ec7b8be3555cbec19679c5g.jpg[/img]
and in my script it show I've defined create_command_window
Why doesn't my script work? [Refer to DEMO for more information.]
Demo: http://www.mediafire.com/?jzmtnczgylo
http://www2.mediafire.com/imgbnc.php/55a31f9a353ec7b8be3555cbec19679c5g.jpg[/img]
and in my script it show I've defined create_command_window
Why doesn't my script work? [Refer to DEMO for more information.]
Code:
class Scene_SubMenu < Scene_Base
def initialize(menu_index = 0)
@menu_index = menu_index
end
def start
super
create_menu_background
create_command_window
end
def terminate
super
dispose_menu_background
@command_window.dispose
end
def update
super
check_input_method
@command_window.update
update_command_selection
end
#--------------------------------------------------------------------------
# * Checks the Input Method(Left or Right)
#--------------------------------------------------------------------------
def check_input_method
if Input.trigger?(Input::RIGHT)
$scene = Scene_SubMenu.new
return
elsif Input.trigger?(Input::LEFT)
$scene = Scene_Map.new
return
end
def create_command_window
s0 = Vocab::save
s1 = Vocab::game_end
@command_window = Window_Command.new (160, [s0, s1])
@command_window.index = @menu_index
@command_window.x = (544 - @command_window.width) / 2
@command_window.y = (416 - @command_window.height) / 2
end
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Menu.new(6)
elsif Input.trigger?(Input::C)
Sound.play_decision
case @command_window.index
when 0
$scene = Scene_File.new(true, false, false)
when 1
$scene = Scene_End.new
end
end
end
end
end
Demo: http://www.mediafire.com/?jzmtnczgylo