Thank you. I tried to make the carbon logo for my game fade in and out like the start button logo, but to no avail...The game doesn't show any script error message...It just won't show the logo, nor will it show the push start button logo.
Code:
#==============================================================================
# Splash Screen
#==============================================================================
# Sephiroth Spawn
# 01.08.06
# Version 2
# Modified by Harshboy/Flameguru
#--------------------------------------------------------------------------
# Call Using $scene = Scene_Intro.new([pics], splash_screen)
#==============================================================================
#==============================================================================
# ** Scene_Intro
#==============================================================================
class Scene_Intro
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(pics, splash = nil)
@pics, @splash = pics, splash
end
def setTitle(sprite,title)
@cache={} if !@cache
if !@cache[title]
@cache[title]=Bitmap.new("Graphics/Titles/#{title}")
end
sprite.bitmap=@cache[title]
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Loads Data System and Game System
data_system = load_data("Data/System.rxdata")
game_system = Game_System.new
# Loads the Title.mid in Audio/BGM
game_system.bgm_play(data_system.title_bgm)
# Instance Variables
@item, @speed, @o_speed, @phase = 0, 10, 20, 0
# Background Images
@sprite = Sprite.new
setTitle(@sprite,@pics[@item])
@sprite.opacity = 5
# Start Logo
@start = Sprite.new
setTitle(@start,"Start")
@start.y, @start.z, @start.opacity = 250, 10, 0
# Carbon logo
@carbon = Sprite.new
setTitle(@carbon,"carbon")
@carbon.x,@carbon.y, @carbon.z, @carbon.opacity = 0, 0, 20, 0
# Execute transition
Graphics.transition
# Main loop
while $scene == self
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
case @phase
when 0; intro_update # Into Updating
when 1; splash_update # Splash Updating
when 2; to_splash_update # From Intro To Splash Transition
when 3; to_title_update # From Splash to Title Transtion
end
end
# Prepare for transition
Graphics.freeze
# Dispose of Sprites
if @cache
for i in @cache.values
i.dispose
end
end
@sprite.dispose
@start.dispose
@carbon.dispose
end
#--------------------------------------------------------------------------
# * Frame Update : Intro Images
#--------------------------------------------------------------------------
def intro_update
# If C is pressed
if Input.trigger?(Input::C) && @speed>=0
@phase = @splash.nil? ? 3 : 2
end
# Updates Sprite Opacity
@sprite.opacity += @speed
# Changes Direction
@speed *= -1 if @sprite.opacity >= 255
# Change Sprite
if @sprite.opacity <= 0
@item += 1
@speed *= -1
@item == @pics.size ?
@phase = @splash.nil? ? 3 : 2 :
setTitle(@sprite,@pics[@item])
end
end
#--------------------------------------------------------------------------
# * Frame Update : Splash Image
#--------------------------------------------------------------------------
def splash_update
# If C is pressed
if Input.trigger?(Input::C)
@phase = 3
end
# Loads Sprite Splash Bitmap
setTitle(@sprite,@splash)
# Updates Start Logo Opacity
@start.opacity += @o_speed
# Changes Direction
@o_speed *= -1 if @start.opacity >= 255 || @start.opacity <= 0
# Updates carbon
@o_speed *= -1 if @carbon.opacity >= 255 || @carbon.opacity <= 0
# Updates Splash
@sprite.opacity += @speed if @sprite.opacity < 255
end
#--------------------------------------------------------------------------
# * Frame Update : Intro To Splash Transistion
#--------------------------------------------------------------------------
def to_splash_update
@sprite.opacity > 0 ? @sprite.opacity -= @speed : @phase = 1
end
#--------------------------------------------------------------------------
# * Frame Update : Splash To Title Transistion
#--------------------------------------------------------------------------
def to_title_update
# Decrease Splash Opacity
@sprite.opacity -= @speed if @sprite.opacity > 0
# Decrease Start Logo Opacity
@start.opacity -= @speed if @start.opacity > 0
# Decrease carbon logo Opacity
@carbon.opacity -= @speed if @carbon.opacity > 0
# Proceed to Title Screen
if @sprite.opacity <= 0 && @start.opacity <= 0
Audio.bgm_stop
sscene=PokemonLoadScene.new
sscreen=PokemonLoad.new(sscene)
sscreen.pbStartLoadScreen
end
end
end[code]