Citadin Lv.7
Age : 31 Inscrit le : 13/05/2008 Messages : 151
| Sujet: Script probléme pour crédits Sam 14 Juin 2008 - 11:41 | |
| Salut a tous et a toutes, j'ai un problème, c'est que quand je démarre l'écran titre sa me met les crédits ! voici les scripts que j'ai modfier : Dans voab a cet endroit - Code:
-
# Nouvelle partie def self.new_game return $data_system.terms.new_game end
# Continuer def self.continue return $data_system.terms.continue end
# Crédits def self.credits return $data_system.terms.credits end # Quitter def self.shutdown return $data_system.terms.shutdown end
Et j'ai modifier scene title : - Code:
-
#============================================================================== # ** Scene_Title #------------------------------------------------------------------------------ # This class performs the title screen processing. #==============================================================================
class Scene_Title < Scene_Base #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main if $BTEST # If battle test battle_test # Start battle test else # If normal play super # Usual main processing end end #-------------------------------------------------------------------------- # * Start processing #-------------------------------------------------------------------------- def start super load_database # Load database create_game_objects # Create game objects check_continue # Determine if continue is enabled create_title_graphic # Create title graphic create_command_window # Create command window play_title_music # Play title screen music end #-------------------------------------------------------------------------- # * Execute Transition #-------------------------------------------------------------------------- def perform_transition Graphics.transition(20) end #-------------------------------------------------------------------------- # * Post-Start Processing #-------------------------------------------------------------------------- def post_start super open_command_window end #-------------------------------------------------------------------------- # * Pre-termination Processing #-------------------------------------------------------------------------- def pre_terminate super close_command_window end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate super dispose_command_window snapshot_for_background dispose_title_graphic end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super @command_window.update if Input.trigger?(Input::C) case @command_window.index when 0 #New game command_new_game when 1 # Continue command_continue when 2 # Credits command_credits when 3 # Shutdown command_shutdown end end end #-------------------------------------------------------------------------- # * Load Database #-------------------------------------------------------------------------- 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 #-------------------------------------------------------------------------- # * Load Battle Test Database #-------------------------------------------------------------------------- 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 #-------------------------------------------------------------------------- # * Create Game Objects #-------------------------------------------------------------------------- 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 #-------------------------------------------------------------------------- # * Determine if Continue is Enabled #-------------------------------------------------------------------------- def check_continue @continue_enabled = (Dir.glob('Save*.rvdata').size > 0) end #-------------------------------------------------------------------------- # * Create Title Graphic #-------------------------------------------------------------------------- def create_title_graphic @sprite = Sprite.new @sprite.bitmap = Cache.system("Title") end #-------------------------------------------------------------------------- # * Dispose of Title Graphic #-------------------------------------------------------------------------- def dispose_title_graphic @sprite.bitmap.dispose @sprite.dispose end #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def create_command_window s1 = Vocab::new_game s2 = Vocab::continue s3 = Vocab::credits s4 = Vocab::shutdown @command_window = Window_Command.new(172, [s1, s2, s3, s4]) @command_window.x = (288 - @command_window.width) / 2 @command_window.y = 288 if @continue_enabled # If continue is enabled @command_window.index = 1 # Move cursor over command else # If disabled @command_window.draw_item(1, false) # Make command semi-transparent end @command_window.openness = 0 @command_window.open end #-------------------------------------------------------------------------- # * Dispose of Command Window #-------------------------------------------------------------------------- def dispose_command_window @command_window.dispose end #-------------------------------------------------------------------------- # * Open Command Window #-------------------------------------------------------------------------- def open_command_window @command_window.open begin @command_window.update Graphics.update end until @command_window.openness == 255 end #-------------------------------------------------------------------------- # * Close Command Window #-------------------------------------------------------------------------- def close_command_window @command_window.close begin @command_window.update Graphics.update end until @command_window.openness == 0 end #-------------------------------------------------------------------------- # * Play Title Screen Music #-------------------------------------------------------------------------- def play_title_music $data_system.title_bgm.play RPG::BGS.stop RPG::ME.stop end #-------------------------------------------------------------------------- # * Check Player Start Location Existence #-------------------------------------------------------------------------- def confirm_player_location if $data_system.start_map_id == 0 print "Player start location not set." exit end end #-------------------------------------------------------------------------- # * Command: New Game #-------------------------------------------------------------------------- def command_new_game confirm_player_location Sound.play_decision $game_party.setup_starting_members # Initial party $game_map.setup($data_system.start_map_id) # Initial map position $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 #-------------------------------------------------------------------------- # * Command: Continue #-------------------------------------------------------------------------- def command_continue if @continue_enabled Sound.play_decision $scene = Scene_File.new(false, true, false) else Sound.play_buzzer end end #-------------------------------------------------------------------------- # * Command: Credits #-------------------------------------------------------------------------- def command_credits if @continue_enabled Sound.play_decision $scene = Scene_Credits.new(false, true, false) else Sound.play_buzzer end end #-------------------------------------------------------------------------- # * Command: Shutdown #-------------------------------------------------------------------------- def command_shutdown Sound.play_decision RPG::BGM.fade(800) RPG::BGS.fade(800) RPG::ME.fade(800) $scene = nil end #-------------------------------------------------------------------------- # * Battle Test #-------------------------------------------------------------------------- def battle_test load_bt_database # Load battle test database create_game_objects # Create game objects Graphics.frame_count = 0 # Initialize play time $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
Merci pour votre aide a tous ! |
|
Citadin Lv.7
Age : 31 Inscrit le : 13/05/2008 Messages : 151
| Sujet: Re: Script probléme pour crédits Sam 14 Juin 2008 - 13:11 | |
| Quelqu'un pourrais m'aider ? |
|
Chevalier Lv.17
Age : 31 Inscrit le : 27/04/2008 Messages : 1835
| Sujet: Re: Script probléme pour crédits Sam 14 Juin 2008 - 13:17 | |
| tu peux montrer le Scene_Credits stp???
Pourquoi dans ton message t'as modifié le premier code?
Au début t'avais marqué
return $Scene_Credits = Scene_Credits.new ou un truc du genre... |
|
Citadin Lv.7
Age : 31 Inscrit le : 13/05/2008 Messages : 151
| Sujet: Re: Script probléme pour crédits Sam 14 Juin 2008 - 15:52 | |
| Voila credits : - Code:
-
#Texte CREDITS_FONT = "Times New Roman"# Mettre à la place de "Times new Roman" le nom de la police d'écriture. CREDITS_SIZE = 24#Taille du texte CREDITS_OUTLINE = Color.new(0,0,127, 255)#Couleur ligne CREDITS_SHADOW = Color.new(0,0,0, 100)#Couleur de l'ombre ? CREDITS_FILL = Color.new(255,255,255, 255)#Couleur des files ?
#============================================================================== # ¦ Scene_Credits #------------------------------------------------------------------------------ # Ce script est une modification d'un script pour RPG maker XP #------------------------------------------------------------------------------ # It now uses pictures from the pictures folder instead of titles from the # titles folder. #------------------------------------------------------------------------------ # This script might need the RMXP to RMVX Compatibility Patch avialble at RPG # Maker.net #------------------------------------------------------------------------------ # Edité par Mac Malone (Dr.?) # XP Version: Oringinal Author unknow, but edidted by MiDas Mike so it doesn't # play over the Title, but runs by calling the following: # $scene = Scene_Credits.new #==============================================================================
class Scene_Credits
# This next piece of code is the credits. #Start Editing CREDIT=<<_END_
Golden Flame
Directeur --------------- Kévin
Scripts --------------- Kévin trouver sur rpg-maker-vx.bbactif.com
Graphistes --------------- Kévin avec the Gimp
Mapping --------------- Kévin
Scénario --------------- Kévin
Testeur de la version Beta --------------- Kévin Alex Alexandre
---------------
Merci d'avoir télécharger ce jeu. ---------------
_END_ #Stop Editing def main
#------------------------------- # Animated Background Setup #------------------------------- @sprite = Sprite.new #@sprite.bitmap = Cache.picture($data_system.title_name) @backgroundList = ["001-Title01"] #Edit this to the picture(s) you wish to show in the background. They do repeat. @backgroundGameFrameCount = 0 # Number of game frames per background frame. @backgroundG_BFrameCount = 3.4 @sprite.bitmap = Cache.picture(@backgroundList[0])
#------------------ # Credits Setup #------------------
credit_lines = CREDIT.split(/\n/) credit_bitmap = Bitmap.new(640,32 * credit_lines.size) credit_lines.each_index do |i| line = credit_lines[i] credit_bitmap.font.name = CREDITS_FONT credit_bitmap.font.size = CREDITS_SIZE x = 0 credit_bitmap.font.color = CREDITS_OUTLINE credit_bitmap.draw_text(0 + 1,i * 32 + 1,640,32,line,1) credit_bitmap.draw_text(0 - 1,i * 32 + 1,640,32,line,1) credit_bitmap.draw_text(0 + 1,i * 32 - 1,640,32,line,1) credit_bitmap.draw_text(0 - 1,i * 32 - 1,640,32,line,1) credit_bitmap.font.color = CREDITS_SHADOW credit_bitmap.draw_text(0,i * 32 + 8,640,32,line,1) credit_bitmap.font.color = CREDITS_FILL credit_bitmap.draw_text(0,i * 32,640,32,line,1) end @credit_sprite = Sprite.new(Viewport.new(0,50,640,380)) @credit_sprite.bitmap = credit_bitmap @credit_sprite.z = 9998 @credit_sprite.oy = -430 @frame_index = 0 @last_flag = false
#-------- # Setup #--------
# ME?BGS ?????? Audio.me_stop Audio.bgs_stop Audio.se_stop # ????????? Graphics.transition # ?????? loop do # ???????? Graphics.update # ??????? Input.update # ?????? update # ???????????????? if $scene != self break end end # ????????? Graphics.freeze @sprite.dispose @credit_sprite.dispose end
#Checks if credits bitmap has reached it's ending point def last? return (@frame_index >= @credit_sprite.bitmap.height + 480) end def last if not @last_flag @last_flag = true @last_count = 0 else @last_count += 1 end if @last_count >= 300 $scene = Scene_Map.new end end
#Check if the credits should be cancelled def cancel? if Input.trigger?(Input::C) $scene = Scene_Title.new return true end return false end
#-------------------------------------------------------------------------- # ? ?????? #-------------------------------------------------------------------------- def update @backgroundGameFrameCount = @backgroundGameFrameCount + 1 if @backgroundGameFrameCount >= @backgroundG_BFrameCount @backgroundGameFrameCount = 0 # Add current background frame to the end @backgroundList = @backgroundList << @backgroundList[0] # and drop it from the first position @backgroundList.delete_at(0) @sprite.bitmap = Cache.picture(@backgroundList[0]) end return if cancel? last if last? @credit_sprite.oy += 1 end end |
|
Invité
| Sujet: Re: Script probléme pour crédits Sam 14 Juin 2008 - 20:22 | |
| Peut-etre en changeant - Citation :
- #--------------------------------------------------------------------------
# * Command: Credits #-------------------------------------------------------------------------- def command_credits if @continue_enabled Sound.play_decision $scene = Scene_Credits.new(false, true, false) else Sound.play_buzzer end end Par - Citation :
- #--------------------------------------------------------------------------
# * Command: Credits #-------------------------------------------------------------------------- def command_credits if @continue_enabled Sound.play_decision $scene = Scene_Credits.new else Sound.play_buzzer end end |
|
Citadin Lv.7
Age : 31 Inscrit le : 13/05/2008 Messages : 151
| Sujet: Re: Script probléme pour crédits Dim 15 Juin 2008 - 8:38 | |
| J'ai fait les changements mais maintenant il y a une erreur ici - Code:
-
# Nouvelle partie def self.new_game return $data_system.terms.new_game end
# Continuer def self.continue return $data_system.terms.continue end
# Crédits def self.credits return $data_system.terms.credits end # Quitter def self.shutdown return $data_system.terms.shutdown end |
|
| Sujet: Re: Script probléme pour crédits | |
| |
|