So my title screen is working fairly well for me. I've been messing around with the Scene_Title script a little and so far so good... except one problem...
This is what my title screen currently looks like...
I've been trying to add clouds to the top of the title screen that slowly move off the screen...
And after they have left the screen, I want them to keep crossing the screen in a loop.
My script looks like this...
#==============================================================================# ** Scene_Title#------------------------------------------------------------------------------# This class performs the title screen processing.#==============================================================================class Scene_Title < Scene_Base #-------------------------------------------------------------------------- # * Start Processing #-------------------------------------------------------------------------- def start super SceneManager.clear Graphics.freeze create_background create_foreground create_command_window play_title_music end #-------------------------------------------------------------------------- # * Get Transition Speed #-------------------------------------------------------------------------- def transition_speed return 20 end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate super SceneManager.snapshot_for_background dispose_background dispose_foreground end #-------------------------------------------------------------------------- # * Create Background #-------------------------------------------------------------------------- def create_background @sprite1 = Sprite.new @sprite1.bitmap = Cache.title1($data_system.title1_name) @sprite2 = Sprite.new @sprite2.bitmap = Cache.title2($data_system.title2_name) @bars = Plane.new @bars.bitmap = Cache.title1("Backdrop Clouds2") @sprite3 = Sprite.new @sprite3.bitmap = Cache.title1("Silent Destiny") @bars2 = Plane.new @bars2.bitmap = Cache.title1("Front Clouds2") @sprite4 = Sprite.new @sprite4.bitmap = Cache.title1("Metempsychosis of Evil") center_sprite(@sprite1) center_sprite(@sprite2) center_sprite(@sprite3) center_sprite(@sprite4) end #-------------------------------------------------------------------------- # * Create Foreground #-------------------------------------------------------------------------- def create_foreground @foreground_sprite = Sprite.new @foreground_sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height) @foreground_sprite.z = 100 draw_game_title if $data_system.opt_draw_title end #-------------------------------------------------------------------------- # * Draw Game Title #-------------------------------------------------------------------------- def draw_game_title @foreground_sprite.bitmap.font.size = 48 rect = Rect.new(0, 0, Graphics.width, Graphics.height / 2) @foreground_sprite.bitmap.draw_text(rect, $data_system.game_title, 1) 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 #-------------------------------------------------------------------------- # * Move Sprite to Screen Center #-------------------------------------------------------------------------- def center_sprite(sprite) sprite.ox = sprite.bitmap.width / 2 sprite.oy = sprite.bitmap.height / 2 sprite.x = Graphics.width / 2 sprite.y = Graphics.height / 2 end #-------------------------------------------------------------------------- # * Animation #-------------------------------------------------------------------------- def update super @bars.ox -= 2 @bars2.ox -= 1 end #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def create_command_window @command_window = Window_TitleCommand.new @command_window.set_handler🙂new_game, method🙂command_new_game)) @command_window.set_handler🙂continue, method🙂command_continue)) @command_window.set_handler🙂shutdown, method🙂command_shutdown)) end #-------------------------------------------------------------------------- # * Close Command Window #-------------------------------------------------------------------------- def close_command_window @command_window.close update until @command_window.close? end #-------------------------------------------------------------------------- # * [New Game] Command #-------------------------------------------------------------------------- def command_new_game DataManager.setup_new_game close_command_window fadeout_all $game_map.autoplay SceneManager.goto(Scene_Map) end #-------------------------------------------------------------------------- # * [Continue] Command #-------------------------------------------------------------------------- def command_continue close_command_window SceneManager.call(Scene_Load) end #-------------------------------------------------------------------------- # * [Shut Down] Command #-------------------------------------------------------------------------- def command_shutdown close_command_window fadeout_all SceneManager.exit end #-------------------------------------------------------------------------- # * Play Title Screen Music #-------------------------------------------------------------------------- def play_title_music $data_system.title_bgm.play RPG::BGS.stop RPG::ME.stop endendIt's the script that comes with RPG Maker VX Ace, just with my own edits. As you can see I included a couple custom sprites that do work, except for...
@bars = Plane.new @bars.bitmap = Cache.title1("Backdrop Clouds2")
They only work if it looks like this...
@bars = Sprite.new @bars.bitmap = Cache.title1("Backdrop Clouds2") @bars2 = Sprite.new @bars2.bitmap = Cache.title1("Front Clouds2")...but they won't appear on screen unless I also add...
center_sprite(@bars) center_sprite(@bars2)I also added...
#-------------------------------------------------------------------------- # * Animation #-------------------------------------------------------------------------- def update super @bars.ox -= 2 @bars2.ox -= 1 end...which animates the clouds to move slowly off screen. Once the clouds move off screen, however, they don't ever come back, and I suspect it's because the @bars are not set to "planes."
So I'm lost and have no idea what to add or fix at this point. I'm also attempting to avoid using other's scripts because I have a splash screen script that seems to crash if I use anyone else's title screen script, like MOG's for example.
This is what my title screen currently looks like...
I've been trying to add clouds to the top of the title screen that slowly move off the screen...
And after they have left the screen, I want them to keep crossing the screen in a loop.
My script looks like this...
#==============================================================================# ** Scene_Title#------------------------------------------------------------------------------# This class performs the title screen processing.#==============================================================================class Scene_Title < Scene_Base #-------------------------------------------------------------------------- # * Start Processing #-------------------------------------------------------------------------- def start super SceneManager.clear Graphics.freeze create_background create_foreground create_command_window play_title_music end #-------------------------------------------------------------------------- # * Get Transition Speed #-------------------------------------------------------------------------- def transition_speed return 20 end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate super SceneManager.snapshot_for_background dispose_background dispose_foreground end #-------------------------------------------------------------------------- # * Create Background #-------------------------------------------------------------------------- def create_background @sprite1 = Sprite.new @sprite1.bitmap = Cache.title1($data_system.title1_name) @sprite2 = Sprite.new @sprite2.bitmap = Cache.title2($data_system.title2_name) @bars = Plane.new @bars.bitmap = Cache.title1("Backdrop Clouds2") @sprite3 = Sprite.new @sprite3.bitmap = Cache.title1("Silent Destiny") @bars2 = Plane.new @bars2.bitmap = Cache.title1("Front Clouds2") @sprite4 = Sprite.new @sprite4.bitmap = Cache.title1("Metempsychosis of Evil") center_sprite(@sprite1) center_sprite(@sprite2) center_sprite(@sprite3) center_sprite(@sprite4) end #-------------------------------------------------------------------------- # * Create Foreground #-------------------------------------------------------------------------- def create_foreground @foreground_sprite = Sprite.new @foreground_sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height) @foreground_sprite.z = 100 draw_game_title if $data_system.opt_draw_title end #-------------------------------------------------------------------------- # * Draw Game Title #-------------------------------------------------------------------------- def draw_game_title @foreground_sprite.bitmap.font.size = 48 rect = Rect.new(0, 0, Graphics.width, Graphics.height / 2) @foreground_sprite.bitmap.draw_text(rect, $data_system.game_title, 1) 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 #-------------------------------------------------------------------------- # * Move Sprite to Screen Center #-------------------------------------------------------------------------- def center_sprite(sprite) sprite.ox = sprite.bitmap.width / 2 sprite.oy = sprite.bitmap.height / 2 sprite.x = Graphics.width / 2 sprite.y = Graphics.height / 2 end #-------------------------------------------------------------------------- # * Animation #-------------------------------------------------------------------------- def update super @bars.ox -= 2 @bars2.ox -= 1 end #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def create_command_window @command_window = Window_TitleCommand.new @command_window.set_handler🙂new_game, method🙂command_new_game)) @command_window.set_handler🙂continue, method🙂command_continue)) @command_window.set_handler🙂shutdown, method🙂command_shutdown)) end #-------------------------------------------------------------------------- # * Close Command Window #-------------------------------------------------------------------------- def close_command_window @command_window.close update until @command_window.close? end #-------------------------------------------------------------------------- # * [New Game] Command #-------------------------------------------------------------------------- def command_new_game DataManager.setup_new_game close_command_window fadeout_all $game_map.autoplay SceneManager.goto(Scene_Map) end #-------------------------------------------------------------------------- # * [Continue] Command #-------------------------------------------------------------------------- def command_continue close_command_window SceneManager.call(Scene_Load) end #-------------------------------------------------------------------------- # * [Shut Down] Command #-------------------------------------------------------------------------- def command_shutdown close_command_window fadeout_all SceneManager.exit end #-------------------------------------------------------------------------- # * Play Title Screen Music #-------------------------------------------------------------------------- def play_title_music $data_system.title_bgm.play RPG::BGS.stop RPG::ME.stop endendIt's the script that comes with RPG Maker VX Ace, just with my own edits. As you can see I included a couple custom sprites that do work, except for...
@bars = Plane.new @bars.bitmap = Cache.title1("Backdrop Clouds2")
Code:
@bars2 = Plane.new @bars2.bitmap = Cache.title1("Front Clouds2")
@bars = Sprite.new @bars.bitmap = Cache.title1("Backdrop Clouds2") @bars2 = Sprite.new @bars2.bitmap = Cache.title1("Front Clouds2")...but they won't appear on screen unless I also add...
center_sprite(@bars) center_sprite(@bars2)I also added...
#-------------------------------------------------------------------------- # * Animation #-------------------------------------------------------------------------- def update super @bars.ox -= 2 @bars2.ox -= 1 end...which animates the clouds to move slowly off screen. Once the clouds move off screen, however, they don't ever come back, and I suspect it's because the @bars are not set to "planes."
So I'm lost and have no idea what to add or fix at this point. I'm also attempting to avoid using other's scripts because I have a splash screen script that seems to crash if I use anyone else's title screen script, like MOG's for example.