XeroVolume
Member
I am working on my first script attempt: A custom splash screen to display before the title screen! Yes I know there are very capable splash screen scripts out there, but that's not the point! I want to learn RGSS, so I have to do it my own way right?
This is my first script so I'm focusing on proper syntax, spacing, commenting... you know, overall tidiness!
Anyway, take a look at what I have so you will know where I'm at...
I got most of this from Scene_Title and changed what was necessary to turn it into a splash screen. There are still a few lines that I don't understand but for the most part I am learning a lot! Now here come a few questions.
1. How can I have the splash screen fade in and out? I have tried things like:
etc... I must be missing something because I can never get it to fade in or out.
2. How can I have the splash display for a set amount of time, and then automatically go to Scene_Title?
Any help from the masters will be GREATLY appreciated!!!
This is my first script so I'm focusing on proper syntax, spacing, commenting... you know, overall tidiness!
Anyway, take a look at what I have so you will know where I'm at...
Code:
#==============================================================================
# ** Scene_Splash
#------------------------------------------------------------------------------
# This class performs Splash screen processing
#==============================================================================
class Scene_Splash
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Make Splash Screen graphic
@splash = Sprite.new
@splash.bitmap = RPG::Cache.title("001-Splash01")
# 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
end
# Prepare for transition
Graphics.freeze
# Dispose of Splash Screen graphic
@splash.dispose
end
#--------------------------------------------------------------------------
# * Frame update
#--------------------------------------------------------------------------
def update
# If C button was pressed
if Input.trigger?(Input::C)
# Switch to title screen
$scene = Scene_Title.new
end
# Update Graphics
@splash.update
end
end
I got most of this from Scene_Title and changed what was necessary to turn it into a splash screen. There are still a few lines that I don't understand but for the most part I am learning a lot! Now here come a few questions.
1. How can I have the splash screen fade in and out? I have tried things like:
Code:
if @splash.opacity != 255
@splash.opacity += 5
etc... I must be missing something because I can never get it to fade in or out.
2. How can I have the splash display for a set amount of time, and then automatically go to Scene_Title?
Any help from the masters will be GREATLY appreciated!!!