Use this:
I don't understand well your specifications, so if the script have something bad, I will change it.
Code:
class Scene_Title
def main
if $BTEST
battle_test
return
end
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
$game_system = Game_System.new
@background_images = ["1","2","3","4","5","6"] # Change here the names of
# yours backgrounds
@background_image_index = 0
@background_image_time_max = 20 # Change here the time that will be waited
# until changing the backgroung image
@background_image_time = @background_image_time_max
@sprite = Sprite.new
@sprite.x = -640
@sprite.y = -480
@sprite.bitmap = RPG::Cache.title(@background_images[0])
s1 = "New Game"
s2 = "Continue"
s3 = "Shutdown"
@command_window = Window_Command.new(192, [s1, s2, s3])
@command_window.back_opacity = 160
@command_window.x = 640 - @command_window.width
@command_window.y = 240 - @command_window.height / 2
@command_window.opacity = 0
@command_window.back_opacity = 0
@command_window.contents_opacity = 0
@continue_enabled = false
for i in 0..3
if FileTest.exist?("Save#{i+1}.rxdata")
@continue_enabled = true
end
end
if @continue_enabled
@command_window.index = 1
else
@command_window.disable_item(1)
end
Audio.bgm_stop
Audio.me_stop
Audio.bgs_stop
Graphics.transition
Audio.se_play("Audio/SE/" + "***", 100, 100) # Change *** to the sound you
# want
x = -640
until @sprite.y == 0
@background_image_time -= 1
if @background_image_time == 0
@background_image_time = @background_image_time_max
@background_image_index += 1
@background_image_index = 0 if @background_image_index == 6
@sprite.bitmap = RPG::Cache.title(@background_images[@background_image_index])
end
x += 1.33
@sprite.x = x
@sprite.y += 1
Graphics.update
end
until @command_window.contents_opacity == 255
@background_image_time -= 1
if @background_image_time == 0
@background_image_time = @background_image_time_max
@background_image_index += 1
@background_image_index = 0 if @background_image_index == 6
@sprite.bitmap = RPG::Cache.title(@background_images[@background_image_index])
end
@command_window.opacity += 5
@command_window.back_opacity += 5
@command_window.contents_opacity += 5
Graphics.update
end
$game_system.bgm_play($data_system.title_bgm)
while $scene == self
@background_image_time -= 1
if @background_image_time == 0
@background_image_time = @background_image_time_max
@background_image_index += 1
@background_image_index = 0 if @background_image_index == 6
@sprite.bitmap = RPG::Cache.title(@background_images[@background_image_index])
end
Graphics.update
Input.update
update
end
Graphics.freeze
@command_window.dispose
@sprite.bitmap.dispose
@sprite.dispose
end
end