Neto Rpg
Membro Especial
Postagens : 30 Data de inscrição : 15/08/2009
| Assunto: NTO- Castlevania Title Screen (VX Version) Sáb Out 31, 2009 1:19 pm | |
| NTO- Castlevania Title Screen (VX Version) por Neto Rpg
Introdução Esse script cria uma tela de títudo semelhante à do jogo "Castlevania Symphony of the Night". Características
- Contém a tela de "Press Start"
- As sombras do fundo se movimentam.
Screenshots- Spoiler:
Press Enter
Titulo
Como usar Cole o script acima do Main copie a pasta "Title" que está dentro da pasta "Pictures" da demonstração para a pasta do seu projeto e substitua as imagens. - Código:
-
#==============================================================================# # N T O - C A S T L E V A N I A T I T L E S C R E E N # # By Neto Rpg # #==============================================================================# #==============================================================================# # Para "Customizar" troque as imagens que estão na pasta "Pictures/Title # # para imagens de sua preferência, mantendo o nome do arquivo. # #==============================================================================# class Scene_Title < Scene_Base def initialize super @sprite = Sprite.new; @aperte = Sprite.new; @logo = Sprite.new @sombras = Sprite.new; @creditos = Sprite.new @sprite.bitmap = Cache.picture("/Title/Back") @aperte.bitmap = Cache.picture("/Title/Aperte") @logo.bitmap = Cache.picture("/Title/Logo") @creditos.bitmap = Cache.picture("/Title/Creditos") @sprite.z = 10; @sombras.z = 20; @sombras.opacity = 190; @logo.z = 30 @aperte.z = 30; @aperte.x = 80; @aperte.y = 280; @aperte.visible = true @creditos.z = 30; @creditos.y = 340; @ativar = true; @ativarb = true @sombra = 1; @velocidade = 0; @velocidadeb = 0; Graphics.transition loop do; Graphics.update; Input.update; update if $scene != self; break; Graphics.freeze; end; end; end def update super @velocidade += 1; @velocidadeb += 1 if @velocidade > 6; if @ativar == true; if @sombra < 5; @sombra += 1; end if @sombra > 4; @ativar = false; end; end; if @ativar == false if @sombra > 0; @sombra -= 1; end; if @sombra <= 1 @ativar = true; end; end; @velocidade = 0; end if @ativarb == true and @velocidadeb == 30; if @aperte.visible == true @aperte.visible = false; @ativarb = false; @velocidadeb = 0; end; end if @ativarb == false and @velocidadeb == 30; if @aperte.visible == false @aperte.visible = true; @ativarb = true; @velocidadeb = 0; end; end @sombras.bitmap = Cache.picture("/Title/Sombra_" + @sombra.to_s) if Input.trigger?(Input::C);Audio.se_play("Audio/SE/PressEnter") $scene = Scene_Castlevania_Title.new; end; end def terminate super @sprite.dispose; @sombras.dispose; @logo.dispose; @aperte.dispose; @creditos.dispose end; end #=====================================================================# class Scene_Castlevania_Title < Scene_Base def main if $BTEST; battle_test; else; super; end; end def start super load_database; create_game_objects; create_title_graphic create_command_window; play_title_music for i in 0..3 if FileTest.exist?("Save#{i+1}.rvdata") @continue_enabled = true; end; end if @continue_enabled == true; @command_window.index = 1; $c = 0 else; $c = 255; @continuar.tone = Tone.new(0, 0, 0, 255); end Audio.me_stop; Audio.bgs_stop; @novo_jogo.x = 23; @novo_jogo.y = 56 @continuar.x = 100; @continuar.y = 154; @sair.x = 180; @sair.y = 256 @escolha.x = 310; @escolha.y = 10; @comandos.x = 14; @comandos.y = 318 $r = 0; $g = 0; $b = 0; @brilho = true; end def perform_transition Graphics.transition(20); end def pre_terminate super close_command_window; end def terminate super dispose_command_window; snapshot_for_background; dispose_title_graphic; end def update super if Input.trigger?(Input::UP); $r = 0; $g = 0; $b = 0; end if Input.trigger?(Input::DOWN); $r = 0; $g = 0; $b = 0; end if @brilho == true if $r < 100; $r += 2; end; if $g < 100; $g += 2; end; if $b < 50; $b += 1; end if $r == 100 and $g == 100 and $b == 50; @brilho = false; end; end if @brilho == false; if $r > 1; $r -= 2; end; if $g > 1; $g -= 2; end; if $b > 0; $b -= 1; end if $r == 0 and $g == 0 and $b == 0; @brilho = true; end; end case @command_window.index when 0 @novo_jogo.tone = Tone.new($r, $g, $b, 0) @continuar.tone = Tone.new(0, 0, 0, $c); @sair.tone = Tone.new(0, 0, 0, 0) when 1 @continuar.tone = Tone.new($r, $g, $b, $c) @novo_jogo.tone = Tone.new(0, 0, 0, 0); @sair.tone = Tone.new(0, 0, 0, 0) when 2 @continuar.tone = Tone.new(0, 0, 0, $c) @sair.tone = Tone.new($r, $g, $b, 0); @novo_jogo.tone = Tone.new(0, 0, 0, 0); end case @command_window.index when 0 @novo_jogo.tone = Tone.new($r, $g, $b, 0) @continuar.tone = Tone.new(0, 0, 0, $c); @sair.tone = Tone.new(0, 0, 0, 0) when 1 @continuar.tone = Tone.new($r, $g, $b, $c) @novo_jogo.tone = Tone.new(0, 0, 0, 0); @sair.tone = Tone.new(0, 0, 0, 0) when 2 @continuar.tone = Tone.new(0, 0, 0, $c); @sair.tone = Tone.new($r, $g, $b, 0) @novo_jogo.tone = Tone.new(0, 0, 0, 0); end; @command_window.update if Input.trigger?(Input::C) case @command_window.index when 0 # Novo Jogo command_new_game when 1 # Continuar command_continue when 2 # Sair command_shutdown; end; end; end def load_database $data_actors = load_data("Data/Actors.rvdata") $data_classes = load_data("Data/Classes.rvdata") $data_skills = load_data("Data/Skills.rvdata") $data_items = load_data("Data/Items.rvdata") $data_weapons = load_data("Data/Weapons.rvdata") $data_armors = load_data("Data/Armors.rvdata") $data_enemies = load_data("Data/Enemies.rvdata") $data_troops = load_data("Data/Troops.rvdata") $data_states = load_data("Data/States.rvdata") $data_animations = load_data("Data/Animations.rvdata") $data_common_events = load_data("Data/CommonEvents.rvdata") $data_system = load_data("Data/System.rvdata") $data_areas = load_data("Data/Areas.rvdata") end def load_bt_database $data_actors = load_data("Data/BT_Actors.rvdata") $data_classes = load_data("Data/BT_Classes.rvdata") $data_skills = load_data("Data/BT_Skills.rvdata") $data_items = load_data("Data/BT_Items.rvdata") $data_weapons = load_data("Data/BT_Weapons.rvdata") $data_armors = load_data("Data/BT_Armors.rvdata") $data_enemies = load_data("Data/BT_Enemies.rvdata") $data_troops = load_data("Data/BT_Troops.rvdata") $data_states = load_data("Data/BT_States.rvdata") $data_animations = load_data("Data/BT_Animations.rvdata") $data_common_events = load_data("Data/BT_CommonEvents.rvdata") $data_system = load_data("Data/BT_System.rvdata") end def create_game_objects $game_temp = Game_Temp.new $game_message = Game_Message.new $game_system = Game_System.new $game_switches = Game_Switches.new $game_variables = Game_Variables.new $game_self_switches = Game_SelfSwitches.new $game_actors = Game_Actors.new $game_party = Game_Party.new $game_troop = Game_Troop.new $game_map = Game_Map.new $game_player = Game_Player.new end def create_title_graphic @sprite = Sprite.new; @novo_jogo = Sprite.new; @continuar = Sprite.new @sair = Sprite.new; @escolha = Sprite.new; @comandos = Sprite.new @sprite.bitmap = Cache.picture("/Title/TitleBack") @novo_jogo.bitmap = Cache.picture("/Title/Novo Jogo") @continuar.bitmap = Cache.picture("/Title/Continuar") @sair.bitmap = Cache.picture("/Title/Sair") @escolha.bitmap = Cache.picture("/Title/Escolha") @comandos.bitmap = Cache.picture("/Title/Comandos") @novo_jogo.x = 50; @novo_jogo.y = 80; @continuar.x = 150; @continuar.y = 180 @sair.x = 240; @sair.y = 280; @escolha.x = 350; @escolha.y = 20 @comandos.x = 20; @comandos.y = 360; end def dispose_title_graphic @sprite.bitmap.dispose; @sprite.dispose; @novo_jogo.dispose @continuar.dispose; @sair.dispose; @escolha.dispose; @comandos.dispose; end def create_command_window s1 = ""; s2 = ""; s3 = "" @command_window = Window_Command.new(192, [s1, s2, s3]) @command_window.z = - 10; @command_window.opacity = 0 @continue_enabled = false; end def dispose_command_window @command_window.dispose; end def close_command_window @command_window.close begin @command_window.update; Graphics.update; end until @command_window.openness == 0; end def play_title_music $data_system.title_bgm.play; RPG::BGS.stop; RPG::ME.stop; end def confirm_player_location if $data_system.start_map_id == 0 print "A Posição Inicial de Personagem não foi definida."; exit; end; end def command_new_game #--Novo Jogo--# confirm_player_location; Sound.play_decision $game_party.setup_starting_members; $game_map.setup($data_system.start_map_id) $game_player.moveto($data_system.start_x, $data_system.start_y) $game_player.refresh; $scene = Scene_Map.new; RPG::BGM.fade(1500) close_command_window; Graphics.fadeout(60); Graphics.wait(40) Graphics.frame_count = 0; RPG::BGM.stop; $game_map.autoplay; end def command_continue #--Continuar--# if @continue_enabled; Sound.play_decision $scene = Scene_File.new(false, true, false); else; Sound.play_buzzer; end; end def command_shutdown #--Sair--# Sound.play_decision; RPG::BGM.fade(800); RPG::BGS.fade(800); RPG::ME.fade(800) $scene = nil; end def battle_test load_bt_database; create_game_objects; Graphics.frame_count = 0 $game_party.setup_battle_test_members $game_troop.setup($data_system.test_troop_id); $game_troop.can_escape = true $game_system.battle_bgm.play; snapshot_for_background $scene = Scene_Battle.new; end; end class Scene_File < Scene_Base def return_scene if @from_title; $scene = Scene_Castlevania_Title.new elsif @from_event; $scene = Scene_Map.new else; $scene = Scene_Menu.new(4); end; end; end
Perguntas Frequentes - Citação :
- Pergunta: Funciona no XP?
Resposta: Não, mas já existe uma versão para XP. Créditos e Agradecimentos
- Feito por Neto Rpg
- Imagens ripadas por Neto Rpg.
- Konami pelo maravilhoso jogo onde eu me inspirei para criar o title.
|
|