Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> Need Help With XeroVoume's Splash Screen Script
SleepingSirenx
post Nov 12 2011, 07:17 PM
Post #1


The SMT Maniac
Group Icon

Group: Revolutionary
Posts: 125
Type: Developer
RM Skill: Undisclosed




I'm having problems with XeroVolume's script ....
I tried to edit it o that it can support up to 8 splash screens but I cant seem to get it work. The first splash screen image shows then the rest don't. Can someone help me with this? Thank you. I'll include the EDITED script of his. smile.gif

CODE
#==============================================================================
# ** Scene_Splash (Ultimate Splash Scene 3.1.2 Plug-n-Play Edition)
#    By: XeroVolume
#    Date: Friday, June 11, 2010
#------------------------------------------------------------------------------
#  Special Thanks: Brewmeister for help with the original counter!
#------------------------------------------------------------------------------
#  This class performs Splash screen processing
#==============================================================================

class Scene_Splash
  #----------------------------------------------------------------------------
  # * Object Initialization
  #----------------------------------------------------------------------------
  def initialize
    #--------------------------------------------------------------------------
    #  The following variables can be customized to fit your preferences
    #--------------------------------------------------------------------------
    # Allow splash screen during playtest? (true = allow / false = do not allow)
    @playtest = true
    # Allow skip to title with SPACE or C? (true = allow / false = do not allow)
    @skip = false
    # Set the total amount of splash screens to be displayed (Default = 2)
    @amount = 8
    # Set amount of time between each splash screen (Default = 51)
    @space = 51
    # Set amount of time between final splash and title (Default = 0)
    @title_space = 0
    #--------------------------------------------------------------------------
    #  Audio Options
    #--------------------------------------------------------------------------
    # Allow SE when skipping to title? (true = allow / false = do not allow)
    @skip_se_allow = true
    # Allow BGM for splash screen 1? (true = allow / false = do not allow)
    @bgm1_allow = true
    # Allow BGM for splash screen 2? (true = allow / false = do not allow)
    @bgm2_allow =  true
    #BGM for 3
    @bgm3_allow =  true
    #BGM for 4
    @bgm4_allow =  true
    #BGM for 5
    @bgm5_allow =  true
    #BGM for 6
    @bgm6_allow =  true
    #BGM for 7
    @bgm7_allow =  true
    #BGM for 8
    @bgm8_allow =  true
    # Set BGM for splash screen 1 (Default = 061-Slow04)
    @bgm1 = '061-Slow04'
    # Set BGM for splash screen 2 (Default = 062-Slow05)
    @bgm2 = '062-Slow05'
    # Set SE for skip to title function (Default = 003-System03)
    @skip_se = '003-System03'
    # Set fade out time (in seconds) for splash screen 1 audio (Default = 2.5)
    @bgm1_out = 2.5
    # Set fade out time (in seconds) for splash screen 2 audio (Default = 2.5)
    @bgm2_out = 2.5
    #--------------------------------------------------------------------------
    #  Splash Screen 1 Options
    #--------------------------------------------------------------------------
    # Set file to be used for splash screen 1
    @splash1 = '1'
    # Set amount of frames it takes for splash 1 to fade in (Default = 51)
    @in_time1 = 51
    # Set amount of frames that splash screen 1 stays opaque (Default = 102)
    @pause_time1 = 102
    # Set amount of frames it takes for splash 1 to fade out (Default = 51)
    @out_time1 = 51
    #--------------------------------------------------------------------------
    #  Splash Screen 2 Options
    #--------------------------------------------------------------------------
    # Set file to be used for splash screen 2
    @splash2 = '2'
    # Set amount of frames it takes for splash 2 to fade in (Default = 51)
    @in_time2 = 51
    # Set amount of frames that splash screen 2 stays opaque (Default = 102)
    @pause_time2 = 102
    # Set amount of frames it takes for splash 2 to fade out (Default = 51)
    @out_time2 = 51
    #--------------------------------------------------------------------------
    #  Splash Screen 3 Options
    #--------------------------------------------------------------------------
    # Set file to be used for splash screen 2
    @splash3 = '3'
    # Set amount of frames it takes for splash 2 to fade in (Default = 51)
    @in_time3 = 51
    # Set amount of frames that splash screen 2 stays opaque (Default = 102)
    @pause_time3 = 102
    # Set amount of frames it takes for splash 2 to fade out (Default = 51)
    @out_time3 = 51
    #--------------------------------------------------------------------------
    #  Splash Screen 4 Options
    #--------------------------------------------------------------------------
    # Set file to be used for splash screen 2
    @splash4 = '4'
    # Set amount of frames it takes for splash 2 to fade in (Default = 51)
    @in_time4 = 51
    # Set amount of frames that splash screen 2 stays opaque (Default = 102)
    @pause_time4 = 102
    # Set amount of frames it takes for splash 2 to fade out (Default = 51)
    @out_time4 = 51
    #--------------------------------------------------------------------------
    #  Splash Screen 5 Options
    #--------------------------------------------------------------------------
    # Set file to be used for splash screen 2
    @splash5 = '5'
    # Set amount of frames it takes for splash 2 to fade in (Default = 51)
    @in_time5 = 51
    # Set amount of frames that splash screen 2 stays opaque (Default = 102)
    @pause_time5 = 102
    # Set amount of frames it takes for splash 2 to fade out (Default = 51)
    @out_time5 = 51
    #--------------------------------------------------------------------------
    #  Splash Screen 6 Options
    #--------------------------------------------------------------------------
    # Set file to be used for splash screen 2
    @splash6 = '6'
    # Set amount of frames it takes for splash 2 to fade in (Default = 51)
    @in_time6 = 51
    # Set amount of frames that splash screen 2 stays opaque (Default = 102)
    @pause_time6 = 102
    # Set amount of frames it takes for splash 2 to fade out (Default = 51)
    @out_time6 = 51
    #--------------------------------------------------------------------------
    #  Splash Screen 7 Options
    #--------------------------------------------------------------------------
    # Set file to be used for splash screen 2
    @splash7 = '7'
    # Set amount of frames it takes for splash 2 to fade in (Default = 51)
    @in_time7 = 51
    # Set amount of frames that splash screen 2 stays opaque (Default = 102)
    @pause_time7 = 102
    # Set amount of frames it takes for splash 2 to fade out (Default = 51)
    @out_time7 = 51
    #--------------------------------------------------------------------------
    #  Splash Screen 8 Options
    #--------------------------------------------------------------------------
    # Set file to be used for splash screen 2
    @splash8 = '8'
    # Set amount of frames it takes for splash 2 to fade in (Default = 51)
    @in_time8 = 51
    # Set amount of frames that splash screen 2 stays opaque (Default = 102)
    @pause_time8 = 102
    # Set amount of frames it takes for splash 2 to fade out (Default = 51)
    @out_time8 = 51
    #------------------------------------------------------------------------
    #  The following variables should not be adjusted
    #------------------------------------------------------------------------
    # Create loop counter (Must start at zero)
    @counter = 0
    # Set initial splash screen opacity (Must start at 0.0)
    @fade = 0.0
    # Calculate splash 1 fade in speed
    @in_speed1 = (255.0 / @in_time1)
    # Calculate splash 1 fade out speed
    @out_speed1 = (255.0 / @out_time1)
    # Calculate splash 2 fade in speed
    @in_speed2 = (255.0 / @in_time2)
    # Calculate splash 2 fade out speed
    @out_speed2 = (255.0 / @out_time2)
    # Calculate splash 3 fade in speed
    @in_speed3 = (255.0 / @in_time2)
    # Calculate splash 3 fade out speed
    @out_speed3 = (255.0 / @out_time2)
    # Calculate splash 4 fade in speed
    @in_speed4 = (255.0 / @in_time2)
    # Calculate splash 4 fade out speed
    @out_speed4 = (255.0 / @out_time2)
    # Calculate splash 5 fade in speed
    @in_speed5 = (255.0 / @in_time2)
    # Calculate splash 5 fade out speed
    @out_speed5 = (255.0 / @out_time2)
    # Calculate splash 6 fade in speed
    @in_speed6 = (255.0 / @in_time2)
    # Calculate splash 6 fade out speed
    @out_speed6 = (255.0 / @out_time2)
    # Calculate splash 7 fade in speed
    @in_speed7 = (255.0 / @in_time2)
    # Calculate splash 7 fade out speed
    @out_speed7 = (255.0 / @out_time2)
    # Calculate splash 8 fade in speed
    @in_speed8 = (255.0 / @in_time2)
    # Calculate splash 8 fade out speed
    @out_speed8 = (255.0 / @out_time2)
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Check for Battle Test
    if $BTEST
      # Switch to Title Screen
      $scene = Scene_Title.new
    end
    # Check for Play Test
    if $DEBUG && @playtest == false
      # Switch to Title Screen
      $scene = Scene_Title.new
    end
    # Load the System database & create a new game
    $data_system = load_data("Data/System.rxdata")
    $game_system = Game_System.new
    # Create splash screen 1 graphic
    @sprite1 = Sprite.new
    @sprite1.bitmap = RPG::Cache.title(@splash1)
    # Adjust sprite properties
    @sprite1.ox = @sprite1.bitmap.width / 2
    @sprite1.oy = @sprite1.bitmap.height / 2
    # Center sprite on screen
    @sprite1.x = 320
    @sprite1.y = 240
    # Set initial opacity
    @sprite1.opacity = 0
    # Create splash screen 2 graphic
    @sprite2 = Sprite.new
    @sprite2.bitmap = RPG::Cache.title(@splash2)
    # Adjust sprite properties
    @sprite2.ox = @sprite2.bitmap.width / 2
    @sprite2.oy = @sprite2.bitmap.height / 2
    # Center sprite on screen
    @sprite2.x = 320
    @sprite2.y = 240
    # Set initial opacity
    @sprite2.opacity = 0
    # Create splash screen 3 graphic
    @sprite3 = Sprite.new
    @sprite3.bitmap = RPG::Cache.title(@splash3)
    # Adjust sprite properties
    @sprite3.ox = @sprite2.bitmap.width / 2
    @sprite3.oy = @sprite2.bitmap.height / 2
    # Center sprite on screen
    @sprite3.x = 320
    @sprite3.y = 240
    # Set initial opacity
    @sprite3.opacity = 0
    # Create splash screen 4 graphic
    @sprite4 = Sprite.new
    @sprite4.bitmap = RPG::Cache.title(@splash4)
    # Adjust sprite properties
    @sprite4.ox = @sprite2.bitmap.width / 2
    @sprite4.oy = @sprite2.bitmap.height / 2
    # Center sprite on screen
    @sprite4.x = 320
    @sprite4.y = 240
    # Set initial opacity
    @sprite4.opacity = 0
    # Create splash screen 5 graphic
    @sprite5 = Sprite.new
    @sprite5.bitmap = RPG::Cache.title(@splash5)
    # Adjust sprite properties
    @sprite5.ox = @sprite2.bitmap.width / 2
    @sprite5.oy = @sprite2.bitmap.height / 2
    # Center sprite on screen
    @sprite5.x = 320
    @sprite5.y = 240
    # Set initial opacity
    @sprite5.opacity = 0
    # Create splash screen 6 graphic
    @sprite6 = Sprite.new
    @sprite6.bitmap = RPG::Cache.title(@splash6)
    # Adjust sprite properties
    @sprite6.ox = @sprite2.bitmap.width / 2
    @sprite6.oy = @sprite2.bitmap.height / 2
    # Center sprite on screen
    @sprite6.x = 320
    @sprite6.y = 240
    # Set initial opacity
    @sprite6.opacity = 0
    # Create splash screen 7 graphic
    @sprite7 = Sprite.new
    @sprite7.bitmap = RPG::Cache.title(@splash7)
    # Adjust sprite properties
    @sprite7.ox = @sprite2.bitmap.width / 2
    @sprite7.oy = @sprite2.bitmap.height / 2
    # Center sprite on screen
    @sprite7.x = 320
    @sprite7.y = 240
    # Set initial opacity
    @sprite7.opacity = 0
    # Create splash screen 8 graphic
    @sprite8 = Sprite.new
    @sprite8.bitmap = RPG::Cache.title(@splash8)
    # Adjust sprite properties
    @sprite8.ox = @sprite2.bitmap.width / 2
    @sprite8.oy = @sprite2.bitmap.height / 2
    # Center sprite on screen
    @sprite8.x = 320
    @sprite8.y = 240
    # Set initial opacity
    @sprite8.opacity = 0
    # Stop playing ME and BGS
    Audio.me_stop
    Audio.bgs_stop
    # Execute transition
    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
      # Update loop counter
      @counter += 1
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of Splash Screen graphics
    @sprite1.dispose
    @sprite1.bitmap.dispose
    @sprite2.dispose
    @sprite2.bitmap.dispose
    @sprite3.dispose
    @sprite3.bitmap.dispose
    @sprite4.dispose
    @sprite4.bitmap.dispose
    @sprite5.dispose
    @sprite5.bitmap.dispose
    @sprite6.dispose
    @sprite6.bitmap.dispose
    @sprite7.dispose
    @sprite7.bitmap.dispose
    @sprite8.dispose
    @sprite8.bitmap.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame update
  #--------------------------------------------------------------------------
  def update
    # If C button was pressed
    if Input.trigger?(Input::C) && @skip == true
      if @skip_se_allow == true
        # Play decision SE
        $game_system.se_play(RPG::AudioFile.new(@skip_se))
      end
      # Switch to title screen
      $scene = Scene_Title.new
    end
    # Fade Cycle
    fade_cycle
    # Update Graphics
    @sprite1.update
    @sprite2.update
    @sprite3.update
    @sprite4.update
    @sprite5.update
    @sprite6.update
    @sprite7.update
    @sprite8.update
  end
  #--------------------------------------------------------------------------
  # * Fade Cycle
  #--------------------------------------------------------------------------
  def fade_cycle
    # Determinent (Based on amount of splash screens remaining)
    case @amount
    # When 2 splash screens remain
    when 8
      # Check for audio
      if @counter == 1 && @bgm1_allow == true
        $game_system.bgm_play(RPG::AudioFile.new(@bgm1))
      end
      # Set splash screen 1's opacity level equal to @fade variable's value
      @sprite1.opacity = @fade
      # Fade in
      if @counter <= @in_time1
        @fade += @in_speed1
      end
      # Pause splash screen 1
      if @counter >= @in_time1 + @pause_time1
        # Fade out graphics
        @fade -= @out_speed1
      end
      # Fade out BGM
      if @counter == @in_time1 + @pause_time1
        Audio.bgm_fade(@bgm1_out * 1000)
      end
      # Space between splash screens
      if @counter >= @in_time1 + @out_time1 + @pause_time1 + @space
        # Update splash screen amount
        @amount -= 1
        # Reset loop counter
        @counter = 0
        # Reset opacity variable
        @fade = 0
      end
    # When 1 splash screen remains
    when 1
      # Check for audio
      if @counter == 1 && @bgm2_allow == true
        $game_system.bgm_play(RPG::AudioFile.new(@bgm2))
      end
      # Set splash screen 2's opacity level equal to @fade variable's value
      @sprite2.opacity = @fade
      # Fade in
      if @counter <= @in_time2
        @fade += @in_speed2
      end
      # Pause splash screen 2
      if @counter >= @in_time2 + @pause_time2
        # Fade out graphics
        @fade -= @out_speed2
      end
      # Fade out BGM
      if @counter == @in_time2 + @pause_time2
        Audio.bgm_fade(@bgm2_out * 1000)
      end
      # Space between splash screen and title screen
      if @counter >= @in_time2 + @out_time2 + @pause_time2 + @title_space
        # Update splash screen amount
        @amount -= 1
      end
      # When 0 splash screens remain
    when 0
      # Switch to Title Screen
      $scene = Scene_Title.new
    end
  end
  #--------------------------------------------------------------------------
  # * Plug-n-Play Functionality
  #--------------------------------------------------------------------------
  $scene = Scene_Splash.new
  $scene.main while $scene.is_a?(self)
end


__________________________

My First Game .... Yeah .... ~♥
I'm In Need Of A Team To Help Me WIth The Development Of My Game PM Me. :)
- DEMO's On Progress!

I Support This Projects!



Please Teach Me How To Script. :(
I'm Learning How To Script. But Still Teach Me How To Script :)
Damn THERMODYNAMICS! Makes My Head Spin!
Go to the top of the page
 
+Quote Post
   
 
Start new topic
Replies
SleepingSirenx
post Nov 19 2011, 01:07 AM
Post #2


The SMT Maniac
Group Icon

Group: Revolutionary
Posts: 125
Type: Developer
RM Skill: Undisclosed




Gee, thanks for this sir Night_Runner. This really helped. smile.gif Well back to command window tutorials.


__________________________

My First Game .... Yeah .... ~♥
I'm In Need Of A Team To Help Me WIth The Development Of My Game PM Me. :)
- DEMO's On Progress!

I Support This Projects!



Please Teach Me How To Script. :(
I'm Learning How To Script. But Still Teach Me How To Script :)
Damn THERMODYNAMICS! Makes My Head Spin!
Go to the top of the page
 
+Quote Post
   



Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th June 2013 - 09:39 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker