- 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 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
# ** 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?
check_input
end
if Input.repeat?
check_input
end
if Input.trigger?
check_input
end
if Input.repeat?
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:

