I am making a sort of "pet system". Right now I am making the sort of selectable menu to go at the side of the screen while in the pet scene, but I am having some problems.
I tried Dubealex's selectable menu tutorial bit but found it absolutely crap (it doesn't explain anything, just says "copy and paste this into here and you have yourself a menu" pretty much... Or that's what it seemed to me.)
So i decided to sort of er... look for bits and pieces that seemed like parts of a selectable menu from Scene_Menu and er... added them in to my script. I know, I am a noob at RGSS.
As you can er... probably guess I am having a lot of errors...
Are there any sort of guides or anything for making a selectable window? Or er... anyone know what I have done wrong in the scene above?
I tried Dubealex's selectable menu tutorial bit but found it absolutely crap (it doesn't explain anything, just says "copy and paste this into here and you have yourself a menu" pretty much... Or that's what it seemed to me.)
So i decided to sort of er... look for bits and pieces that seemed like parts of a selectable menu from Scene_Menu and er... added them in to my script. I know, I am a noob at RGSS.
Code:
class Scene_PetSystem
#-----------------
# Main processing
#-----------------
def main
# Make command window
s1 = "Pets"
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "Status"
@command_window = Window_Command.new(185, [s1, s2, s3, s4])
@command_window.index = @menu_index
#Call windows
@window1 = Window_Pets1.new
@window2 = Window_Pets2.new
#@window3 = Window_Pets3.new
#@window4 = Window_Pets4.new
@window5 = Window_Pets5.new
#Transition
Graphics.transition
#Main loop
loop do
#Update game screen
Graphics.update
#Update input info
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
@window1.dispose
@window2.dispose
#@window3.dispose
#@window4.dispose
@window5.dispose
@command_window.dispose
end
#-------------------
# Frame update
#-------------------
def update
#Update windows
@command_window.update
@window1.update
@window2.update
#@window3.update
#@window4.update
@window5.update
# If command window is active: call update_command
if @command_window.active
update_command
return
end
end
#--------------------------------------------------------------------------
# * Frame Update (when command window is active)
#--------------------------------------------------------------------------
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 menu screen
$scene = Scene_Menu.new
return
end
# If C button was pressed
if Input.trigger?(Input::C)
case @command_window.index
when 0 # Change Name
# Play decision SE
$game_system.se_play($data_system.decision_se)
#Syntax for 'Change Name'
$scene = Scene_Menu.new
when 1 # Pet Store
# Play decision SE
$game_system.se_play($data_system.decision_se)
#Syntax for 'Pet Store'
$scene = Scene_Menu.new
when 2 # Battlegrounds
# Play decision SE
$game_system.se_play($data_system.decision_se)
#Syntax for 'Battlegrounds'
$scene = Scene_Menu.new
when 3 # Back to Menu
# Play decision SE
$game_system.se_play($data_system.decision_se)
#Syntax for 'Back to Menu'
$scene = Scene_Menu.new
end
return
end
end
end
As you can er... probably guess I am having a lot of errors...
Are there any sort of guides or anything for making a selectable window? Or er... anyone know what I have done wrong in the scene above?