I'm using this script made by TheoAllen for RM Vx Ace to display more than one title screen. I just wanted to ask if someone could help me making the transition between the BGs more "smooth". My title pictures represent the transition from day to night, so it would be nice if they wouldn't change so abrupt. For example, it would be great if one BG fades out while the next BG fades in. Is this possible?
Thanks in advance. 🙂
Thanks in advance. 🙂
Code:
#===============================================================================
# Super Simple Animated Title Screen
# By: TheoAllen
# EDIT: Tw0Face
#-------------------------------------------------------------------------------
# Getting tired of animated title screen that offers you a lot of things you
# don't even need? And why not just use traditional frame per frame animation
# background?
#
# This script is an answer for you
#
# Terms of Use
# Free for commercial and non-commercial
#===============================================================================
module SSAnimTitle
# Set the frame here. Note that it will ONLY change the title1. And will not
# animate the border part (title2)
BackGround = [
"Traventor_Title1",
"Traventor_Title2",
"Traventor_Title3",
"Traventor_Title4",
"Traventor_Title5",
]
# Frame rate. Higher = slower
Rate = 180
end
#===============================================================================
# End of config
#===============================================================================
module Cache
def self.dispose(path)
@cache[path].dispose if @cache[path] && !@cache[path].disposed?
end
end
class Scene_Title
alias ss_anim_title_start start
def start
ss_anim_title_start
precache_animation
@count = 0
#@bg_index = 0
if @bg_index != nil then
@bg_index -= 1
refresh_bg
else
@bg_index = 0
end
end
def precache_animation
SSAnimTitle::BackGround.each do |name|
Cache.title1(name)
end
end
alias ss_anim_title_update update
def update
ss_anim_title_update
@count += 1
refresh_bg if @count % SSAnimTitle::Rate == 0
end
def refresh_bg
@bg_index += 1
@bg_index %= SSAnimTitle::BackGround.size
@sprite1.bitmap = Cache.title1(SSAnimTitle::BackGround[@bg_index])
center_sprite(@sprite1)
end
alias ss_anim_title_terminate terminate
def terminate
ss_anim_title_terminate
SSAnimTitle::BackGround.each do |name|
Cache.dispose("Graphics/Titles1/" + name)
end
end
end