Sobeman459
Member
Ok for my menu i want windows to change when you press left and right. My script below is not changing windows when i press left and right. There will be five windows when the script is done. Can someone take a look at this and help me?
Code:
#==============================================================================
# ** Scene_Menu_SoBe
#------------------------------------------------------------------------------
# Â Menu System
#==============================================================================
Â
class Scene_Menu_SoBe
 #--------------------------------------------------------------------------
 # * Scene Processing
 #--------------------------------------------------------------------------
 def main
  # Make sprite set
  @spriteset = Spriteset_Map.new
  # Fraction Window
  @Frac = Window_Frac.new
  @Frac.visible = false
  # Item Window
  @Items = Window_Items.new
  @Items.visible = false
  # Transition run
  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 sprite set
  @spriteset.dispose
  @Frac.dispose
  @Items.dispose
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
  # Update sprite set
  @spriteset.update
  @Frac.update
  @Items.update
  @Items.visible = true
  # 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_Map.new
   return
  end
  # If R button was pressed
  if Input.trigger?(Input::R)
   # Play cursor SE
   $game_system.se_play($data_system.cursor_se)
   if @Frac.visible = true
    @Frac.visible = false
    @Items.visible = true
    return
   end
   if @Items.visible = true
    @Frac.visible = true
    @Items.visible = false
    return
   end
   return
  end
  # If L button was pressed
  if Input.trigger?(Input::L)
   # Play cursor SE
   $game_system.se_play($data_system.cursor_se)
   if @Items.visible = true
    @Items.visible = false
    @Frac.visible = true
    return
   end
   if @Frac.visible = true
   @Frac.visible = false
   @Items.visible = true
   return
   end
   return
  end
 end
 end