Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Problems with Kain Nobel's Splash Screen?

I've been having problems with Kain Nobel's Splash Screen script. I followed the instructions precisely, double checked the Pictures folder for the image, and am using no other custom scripts, but it always skips directly to Scene_Title. Any ideas on what could cause this? Script below.
[rgss] 
#===============================================================================
# ~** Introductiory Splash Screen **~
#-------------------------------------------------------------------------------
#  Written by   : Kain Nobel
#  Version      : 4.6
#  Last Update  : 06/30/2008
#  Date Created : 02/19/2008
#===============================================================================
#  Special Thanks
#     Inspired by an old script by Dubealex.
#===============================================================================
################################################################################
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
# ~**                 CUSTOMIZABLE CONSTANTS - BEGIN                       **~ #
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
################################################################################
class Splash
  #-----------------------------------------------------------------------------
  # true  : must be 'true' for the script to even work at all.
  # false : yup, the script won't work at all with it 'false'.
  #-----------------------------------------------------------------------------
  Enabled = true
  #-----------------------------------------------------------------------------
  # true  : script plays during editor playtest and from Game.exe
  # false : script disabled during playtest, only works from Game.exe
  #-----------------------------------------------------------------------------
  DEBUG   = true
  #-----------------------------------------------------------------------------
  # nil     : Plays the Title Screen's BGM.
  # ''      : Doesn't play any splash BGM.
  # 'Song'  : Plays track, based on name, in your BGM folder.
  #-----------------------------------------------------------------------------
  BGM     = ''
  BGS     = ''
  #-----------------------------------------------------------------------------
  # Must be named according to filename in the specified
  # folder, 'Graphics/Titles'. The file extention should not
  # matter unless you've got 2 images of the same name with
  # different file extentions. Any image that doesn't exist
  # will be rescue replaced with the default title image.
  #-----------------------------------------------------------------------------
  Images  = {
       1 => "Nerds In Uniform"
  }
  #-----------------------------------------------------------------------------
  # Which Scene would you like to jump to after the splash screen?
  #-----------------------------------------------------------------------------
  Next_Scene = Scene_Title.new
end
################################################################################
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
# ~**                  CUSTOMIZABLE CONSTANTS - END                        **~ #
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
################################################################################
class Scene_Splash
  #-----------------------------------------------------------------------------
  # * Object Initialization
  #-----------------------------------------------------------------------------
  def initialize
    # Initilizes Splash Screen play information
    @show         = true
    @transition   = 0
    @index        = 0
    @images       = Splash::Images.size + 1
    @sprite       = []
    @splash_bgm   = Splash::BGM
    @splash_bgs   = Splash::BGS
    # Load the System Database Information
    $game_system  = Game_System.new
    $data_system  = load_data("Data/System.rxdata")
  end
  #-----------------------------------------------------------------------------
  # * Main Method
  #-----------------------------------------------------------------------------
  def main
    # Skip to Next Scene if Splash isn't Enabled
    unless Splash::Enabled
      next_scene
      return
    end
    # Skip to Next Scene if $DEBUG flag and if playtest DEBUG disabled.
    if $DEBUG and not Splash::DEBUG
      next_scene
      return
    end
    setup_splash_scene
    # Graphics Transition
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      # Update Method
      update
      if $scene != self
        break
      end
    end
    # Dispose of Graphics after loop/update has finished.
    Graphics.freeze
    for i in 1...@images
      @sprite.dispose
    end
  end
  #-----------------------------------------------------------------------------
  # * Setup Method
  #-----------------------------------------------------------------------------
  def setup_splash_scene
    # Play Splash BGM
    @blank        = RPG::AudioFile.new("")
    case @splash_bgm
    when ''   ; $game_system.bgm_play($data_system.title_bgm)
    when nil  ; $game_system.bgm_play(RPG::AudioFile.new(''))
    else      ; $game_system.bgm_play(RPG::AudioFile.new(@splash_bgm))
    end
    # Play Splash BGS
    $game_system.bgs_play(RPG::AudioFile.new(@splash_bgs)) rescue @blank
    @blank        = RPG::Cache.title($data_system.title_name)
    # Create Splash Images
    for i in 1...@images
      @sprite = Sprite.new
      @sprite.bitmap = (RPG::Cache.title(Splash::Images)) rescue @blank
      @sprite.opacity = 0
    end
  end
  #-----------------------------------------------------------------------------
  # Update the contents in this scene
  #-----------------------------------------------------------------------------
  def update
    # Skips to Next Scene if B Button was pressed.
    if Input.trigger?(Input::B)
      next_scene
      return
    end
    # Changes Index if C button was pressed.
    if Input.trigger?(Input::C)
      if @transition > 0
        @show = false
        transition
      end
    end
    # Change the opacity of the graphics
    transition
    # Update graphics
    for i in 1...@images
      @sprite.update
    end
  end
  #-----------------------------------------------------------------------------
  # * Transition Method
  #-----------------------------------------------------------------------------
  def transition
    # Method for fading IN the Splash Screen, cycle to next
    if @show == true
      @transition += 5
      if @transition > 750
        @show = false
        @transition = 255
      end
    end
    # Method for fading OUT the Splash Screen, cycle to next
    if @show == false
      @transition -= 10
      if @transition < 0
        @show = true
        @index += 1
        @transition = 0
      end
    end
    # * Determines Next splash or go-to Scene_Title.
    if @index < Splash::Images.size + 1
      @sprite[@index].opacity = @transition unless @sprite[@index].nil?
    else
      next_scene
    end
  end
  #-----------------------------------------------------------------------------
  # * Skip to Scene_Title
  #-----------------------------------------------------------------------------
  def next_scene
    $scene = Splash::Next_Scene
  end
end
 
[/rgss]
Thanks!
 
Hmm, look for 'main' in your script editor (it should be the very last script) and make sure that it says...

$scene = Scene_Splash.new (instead of Scene_Title.new)

Thats the only thing I can think of that might be wrong, because it looks like you've set it up correctly and it works fine when I test it.

Please note, if for some reason the script can't find the image, your splash will be rescue-replaced with the Title graphic.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top