Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> Splash Screen & Introduction, By sephiroth spawn
Rydin
post Mar 1 2006, 04:40 AM
Post #1


Level 43


Group: Retired Admin Staff
Posts: 1,185
Type: None
RM Skill: Undisclosed




This script wasn't made by me. Post/intrusctions quoted directly from the creator, sephiroth spawn.

___________________________

Introduction & Splash Scene - Last Updated : 01.08.05

Demo below

Description
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:
CODE
$scene = Scene_Title.new

with this:
CODE
$scene = Scene_Intro.new( [x], y)


Now Just replace x and y.

Change x to the pictures names and the order they will appear.
For instance: 3 Pictures named : "Pic 1", "Pic 2", "Pic 3" so your code would now be:
CODE
$scene = Scene_Title.new( ["Pic 1", "Pic 2", "Pic 3"], y)


Now, if you dont 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:
CODE
$scene = Scene_Title.new( ["Pic 1", "Pic 2", "Pic 3"], "Splash")


Now just put this code above Scene_Title.


CODE
#====================================================
# Introduction & Splash Scene
#====================================================
# SephirothSpawn
# 01.08.06
# Version 2
#--------------------------------------------------------------------------
# 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
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Loads Data System and Game System to Play BGM
data_system = load_data("Data/System.rxdata")
game_system = Game_System.new
game_system.bgm_play(data_system.title_bgm)
# Instance Variables
@item, @speed, @o_speed, @phase = 0, 5, 5, 0
# Background Images
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title(@pics[@item])
@sprite.opacity = 5
# Start Logo
@start = Sprite.new
@start.bitmap = RPG::Cache.title("Start")
@start.y, @start.z, @start.opacity = 416, 10, 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
@sprite.dispose
@start.dispose
end
#--------------------------------------------------------------------------
# * Frame Update : Intro Images
#--------------------------------------------------------------------------
def intro_update
# If C is pressed
if Input.trigger?(Input::C)
@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 :
@sprite.bitmap = RPG::Cache.title(@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
@sprite.bitmap = RPG::Cache.title(@splash)
# Updates Start Logo Opacity
@start.opacity += @o_speed
# Changes Direction
@o_speed *= -1 if @start.opacity >= 255 || @start.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
# Decresh Start Logo Opacity
@start.opacity -= @speed if @start.opacity > 0
# Proceed to Title Screen
$scene = Scene_Title.new 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:
CODE
Graphics.transition

and make it:
CODE
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. Heres an example:

http://img188.imageshack.us/img188/4131/start0hb.png

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.


Attachment lost, if you have it please PM me, thanks ~ Architect

This post has been edited by Architect: Nov 8 2006, 05:14 PM
Go to the top of the page
 
+Quote Post
   



Closed 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 - 12:41 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker