[ACE] Customized Continue/Loading Screen

mgnesium

the maverick
Member
Joined
Jun 16, 2016
Messages
6
Reaction score
0
First Language
English
Primarily Uses
Hello! I'm working on a Custom Loading Screen that appears after the user chooses "Continue." However, the screen does not load the game file and transition to the map correctly-- could someone please help me out? :)   I think the problem is probably at the end of the script with command_customloading... 


Scene_CustomLoad Code: 

#==============================================================================
# ** Scene_CustomLoad
#------------------------------------------------------------------------------
# This class loads the game in customized format.
#==============================================================================

class Scene_CustomLoad < Scene_Base

#--------------------------------------------------------------------------
# * Start Processing
#--------------------------------------------------------------------------
def start
super
create_background_custom
create_command_window
end

#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
dispose_background
dispose_foreground
end

#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
if Input.trigger?:)DOWN)
check_input
end
if Input.repeat?:)DOWN)
check_input
end
if Input.trigger?:)UP)
check_input
end
if Input.repeat?:)UP)
check_input
end
end

#--------------------------------------------------------------------------
# * Get Current Index
#--------------------------------------------------------------------------
def index
@index
end

#--------------------------------------------------------------------------
# * Check User Input, Changing Opacity of Unselected Sprites
#--------------------------------------------------------------------------
def check_input
case @command_window.index
when 0 # Selection: File One
@spriteLoadTwo.opacity = 133
@spriteLoadThree.opacity = 133
@spriteLoadFour.opacity = 133
when 1 # Selection: File Two
@spriteLoadOne.opacity = 133
@spriteLoadThree.opacity = 133
@spriteLoadFour.opacity = 133
when 2 # Selection: File Three
@spriteLoadOne.opacity = 133
@spriteLoadTwo.opacity = 133
@spriteLoadFour.opacity = 133
when 3 # Selection: File Four
@spriteLoadOne.opacity = 133
@spriteLoadTwo.opacity = 133
@spriteLoadThree.opacity = 133
end
end

#--------------------------------------------------------------------------
# * Create Custom Background & Positioning
#--------------------------------------------------------------------------
def create_background_custom
# Creates the Load Image, File 1
@spriteLoadOne = Sprite.new
@spriteLoadOne.bitmap = Cache.system("File 1")
@spriteLoadOne.x = 30
@spriteLoadOne.y = 45
@spriteLoadOne.z = 10

# Creates the Load Image, File 2
@spriteLoadTwo = Sprite.new
@spriteLoadTwo.bitmap = Cache.system("File 2")
@spriteLoadTwo.x = 30
@spriteLoadTwo.y = 45 + 100
@spriteLoadTwo.z = 10

# Creates The Load Image, File 3
@spriteLoadThree = Sprite.new
@spriteLoadThree.bitmap = Cache.system("File 3")
@spriteLoadThree.x = 30
@spriteLoadThree.y = 45 + 100 + 100
@spriteLoadThree.z = 10

# Creates The Load Image, File 4
@spriteLoadFour = Sprite.new
@spriteLoadFour.bitmap = Cache.system("File 4")
@spriteLoadFour.x = 30
@spriteLoadFour.y = 45 + 100 + 100 + 100
@spriteLoadFour.z = 10
end

#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
@command_window = Window_CustomLoad.new
@command_window.x = 350
@command_window.y = 270
@command_window = Window_CustomLoad.new
@command_window.set_handler("File One", :command_customloading)
@command_window.set_handler("File Two", :command_customloading)
@command_window.set_handler("File Three", :command_customloading)
@command_window.set_handler("File Four", :command_customloading)
@command_window.z = 10
end

#--------------------------------------------------------------------------
# * Free Background
#--------------------------------------------------------------------------
def dispose_background
@sprite1.bitmap.dispose
@sprite1.dispose
@sprite2.bitmap.dispose
@sprite2.dispose
end
#--------------------------------------------------------------------------
# * Free Foreground
#--------------------------------------------------------------------------
def dispose_foreground
@foreground_sprite.bitmap.dispose
@foreground_sprite.dispose
end

#--------------------------------------------------------------------------
# * [Custom Loading] Command
#--------------------------------------------------------------------------
def command_customloading
DataManager.load_game(@index)
SceneManager.goto(Scene_Map)
end

end #of Scene Custom Load


and Window_CustomLoad code, which I don't really think the error is in: 
 



Spoiler



#==============================================================================
# ** Window_TitleCommand
#------------------------------------------------------------------------------
#  This window is for CustomLoading after selection of <Continue>. 
#==============================================================================


class Window_CustomLoad < Window_Command
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0)
    update_placement
    self.openness = 0
    open
  end
  #--------------------------------------------------------------------------
  # * Get Window Width
  #--------------------------------------------------------------------------
  def window_width
    return 160
  end
  #--------------------------------------------------------------------------
  # * Update Window Position
  #--------------------------------------------------------------------------
  def update_placement
    self.x = (Graphics.width - width) / 2
    self.y = (Graphics.height * 1.6 - height) / 2
  end
  
  #--------------------------------------------------------------------------
  # * Get Current Index
  #--------------------------------------------------------------------------
  def index
    @index
  end
  
  #--------------------------------------------------------------------------
  # * [Custom Loading] Command
  #--------------------------------------------------------------------------
  def command_customloading
    DataManager.load_game(@index)
    SceneManager.goto(Scene_Map)
  end
  
  #--------------------------------------------------------------------------
  # * Create Command List
  #--------------------------------------------------------------------------
  def make_command_list
    add_command("File One", :command_customloading)
    add_command("File Two", :command_customloading)
    add_command("File Three", :command_customloading)
    add_command("File Four", :command_customloading)
  end


  
end  #Window of Custom Load
 
Last edited by a moderator:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
That method should look like this:

def command_customloading
if DataManager.load_game(@index)
Sound.play_load
fadeout_all
$game_system.on_after_load
SceneManager.goto(Scene_Map)
else
Sound.play_buzzer
end
end



Btw, you created 2 @command_window, so make sure to remove one!
 

mgnesium

the maverick
Member
Joined
Jun 16, 2016
Messages
6
Reaction score
0
First Language
English
Primarily Uses
Thank you so much for your help, Sixth!  :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,019
Members
137,564
Latest member
McFinnaPants
Top