Jump to content
Zerbu

Zerbu Engine - Random Title Graphic

Recommended Posts

Random Title Graphic

 

Introduction

This script allows you to specify multiple graphic combinations to appear as the title screen graphic. A random one from the list is shown each time the title screen is displayed.

 

Instructions

Edit the option near the top of the script to set the graphics that can appear.

 

Script

 

 

#============================================================================
# Zerbu Engine - Random Title Graphic
#----------------------------------------------------------------------------
# This script allows you to specify multiple graphic combinations to appear as
# the title screen graphic. A random one from the list is shown each time the
# title screen is displayed.
#============================================================================

#============================================================================
# (module) ZE_Random_Title_Graphic
#============================================================================
module ZE_Random_Title_Graphic
 ZE_RTG = {
   #------------------------------------------------------------------------
   # Options
   #------------------------------------------------------------------------
   # This is the list of graphics combinations that can appear as the title
   # screen graphic. The format to use is: ["Title1", "Title2"]
   #------------------------------------------------------------------------
   :RANDOMIZE => [
     ["Crystal", "Gargoyles"],
     ["CrossedSwords", "Dragons"],
     ["Fountain", ""],
     ["Gates", "Heroes"],
     ["World", "Forest"],
     ["Island", "Mountains"]
   ]
 }
end

#============================================================================
# Scene_Title
#============================================================================
class Scene_Title < Scene_Base
 include ZE_Random_Title_Graphic
 #--------------------------------------------------------------------------
 # overwrite method: create_background
 #--------------------------------------------------------------------------
 def create_background
   graphic = ZE_RTG[:RANDOMIZE][rand(ZE_RTG[:RANDOMIZE].size)]
   @sprite1 = Sprite.new
   @sprite1.bitmap = Cache.title1(graphic[0])
   @sprite2 = Sprite.new
   @sprite2.bitmap = Cache.title2(graphic[1])
   center_sprite(@sprite1)
   center_sprite(@sprite2)
 end
end

 

 

  • Like 2

Share this post


Link to post
Share on other sites

could you add an option to specify a BGM to each title screen?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted