Noob Saibot 38 Report post Posted April 13, 2010 RMXPU.net Archive brings you another script from the Archive of RMXPU.net! Nothing Special (Ten minute Project), but I thought I'd post it. Well, Ive seen about 20 different version of all the same thing, just more Sprites added. So I decided to include my own little version that supports infinite pictures, with only one sprite. What it Does: It displays pictures before the Title menu, then, if you want, it will display a final picture with "Press Start" (or whatever you choose) flashing at the bottom. Instructions: Make Sure your pictures are in your Titles folder, with all names known. Then, go into Main and replace the line: $scene = Scene_Title.new( ["Pic 1", "Pic 2", "Pic 3"], y) Now, if you don't want a splash screen, just delete the ", y". But lets say you want one to display a picture named "Splash", just change it now to: $scene = Scene_Title.new( ["Pic 1", "Pic 2", "Pic 3"], "Splash") Now just put this code above Scene_Title. #Class Scene Intro #Call Using $scene = Scene_Intro.new( [ "pic name 1", "pic name 2", ... ], "Splash Pic" ) class Scene_Intro #==================== # --- Sets Up Instance Variables --- #==================== def initialize(pics, splash = false) @pics = pics;@splash = splash end #============= # --- Sets Up Scene --- #============= def main $data_system = load_data("Data/System.rxdata") $game_system = Game_System.new $game_system.bgm_play($data_system.title_bgm) #----- Variable Setup ----- @item = 0;@spd = 5;@o_spd = 5;@phase = 0 #----- Sprite Setup ----- @sprite = Sprite.new @sprite.opacity = 5 @start = Sprite.new @start.bitmap = RPG::Cache.title("Start") @start.y, @start.z, @start.opacity = 416, 10, 0 #----- Scene Processing ----- Graphics.transition loop do Graphics.update Input.update update if @phase == 0 sub if @phase == 1 splash if @phase == 2 fade if @phase == 3 break if @phase == 4 end Graphics.freeze @sprite.dispose;@start.dispose $scene = Scene_Title.new end #============= #--- Scene Updating --- #============= def update #Phase 0 @phase = 1 if Input.trigger?(Input::B) @sprite.bitmap = RPG::Cache.title(@pics[@item]) @sprite.opacity += @spd @spd *= -1 if @sprite.opacity >= 255 if @sprite.opacity <= 0 @item += 1;@spd *= -1 if @item == @pics.size @phase = 1 if @splash != 0 @phase = 2 if @splash == 0 end end end #============= # --- Sub-Transition --- #============= def sub #Phase 1 @sprite.opacity -= @spd if @sprite.opacity > 0 if @sprite.opacity <= 0 @phase = 2 if @splash @phase = 4 if !@splash end end #============= #--- Splash Updating --- #============= def splash #Phase 2 @start.opacity += @o_spd @o_spd *= -1 if @start.opacity >= 255 or @start.opacity <= 0 @sprite.bitmap = RPG::Cache.title(@splash) @sprite.opacity += @spd if @sprite.opacity < 255 if Input.trigger?(Input::C) @phase = 3 end end #========== #--- Pic Fading --- #========== def fade #Phase 3 @sprite.opacity -= @spd if @sprite.opacity > 0 @start.opacity -= @spd if @start.opacity > 0 @phase = 4 if @sprite.opacity <= 0 && @start.opacity <= 0 end end If you would like the Title Screen To Fade in, go into Scene_Title and find the lines: Graphics.transition and make it: Graphics.transition(x) Just Change the x into (I Believe) the number of frames to fade in.(Larger # with make a slower transition) You also need a picture (640*64 resolution) in your Titles folder as well. Here's an example: Just Import That to your titles folder and set the Black Part to transparent. That Should be it. If Need be, I will post a demo. Original Post: RMXPU.net Archive Share this post Link to post Share on other sites