Sleeping Leonhart Posted December 28, 2007 Share Posted December 28, 2007 Random Game OverDescrizioneSempre spulciando nei documenti ho ritrovato questo script vecchioto (uno dei primi che ho fatto).Lo script fa si che quando si fa game over viene visualizzato un immagine random con suono associato. Per esempio se viene mostrata l'immagine di GameOver1 viene eseguito il ME GameOver1AutoreThe Sleeping LeonhartScript #=============================================================================== # Random Game Over #=============================================================================== # by The Sleeping Leonhart #=============================================================================== # Quando si fa game over viene visualizzato un immagine random con suono associato. # Per esempio se viene mostrata l'immagine di GameOver1 viene eseguito il ME GameOver1 #=============================================================================== GAME_OVER_NAME = "GameOver" #Nome dell'immagine di Game Over GAME_OVER_SOUND = "GameOver" #Nome del suono di Game Over GAME_OVER_NUMBER = 3 #Numero di Game Over class Scene_Gameover def main @sprite = Sprite.new @number = rand(GAME_OVER_NUMBER)+1 @sprite.bitmap = RPG::Cache.gameover(GAME_OVER_NAME+@number.to_s) $game_system.bgm_play(nil) $game_system.bgs_play(nil) Audio.me_play("Audio/Me/"+GAME_OVER_SOUND+@number.to_s) Graphics.transition(120) loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @sprite.bitmap.dispose @sprite.dispose Graphics.transition(40) Graphics.freeze if $BTEST $scene = nil end end end Istruzioni per l'usoSettare le seguenti impostazioni per ottenere l'effetto desiderato: GAME_OVER_NAME = "GameOver" #Nome dell'immagine di Game Over GAME_OVER_SOUND = "GameOver" #Nome del suono di Game Over GAME_OVER_NUMBER = 3 #Numero di Game Over http://img296.imageshack.us/img296/8784/csuserbarew2.pngScarica la Demo!Tutti i miei script(o quasi) li trovi Qui! Link to comment Share on other sites More sharing options...
marigno Posted December 28, 2007 Share Posted December 28, 2007 Carinissimo. O:Bravo. ^^ Link to comment Share on other sites More sharing options...
Timisci Posted December 28, 2007 Share Posted December 28, 2007 Si, può tornare utile Progetto in corso: "Hero Walking: Toward Another Life" Video Old Intro su Youtube Visite: 11.896! http://img212.imageshack.us/img212/1060/logheryb0.jpg *Posizioni raggiunte nei contest* http://www.rpg2s.net/awards/bestuser1.jpghttp://www.rpg2s.net/awards/beststaff1.jpg http://www.rpg2s.net/awards/bestmaker3.jpghttp://www.rpg2s.net/awards/bestcritical1.jpghttp://www.rpg2s.net/awards/mostcharismatic2.jpg http://www.rpg2s.net/awards/mosthelpful1.jpghttp://www.rpg2s.net/awards/mostpolite1.jpghttp://www.rpg2s.net/awards/mostpresent1.jpg http://img204.imageshack.us/img204/8039/sccontest3octpl3.gif http://img103.imageshack.us/img103/1496/sccontest2octou1.gif http://img118.imageshack.us/img118/181/sccontest1octdt9.gif http://img230.imageshack.us/img230/1273/sccontest1batio5.gif http://img103.imageshack.us/img103/1496/sccontest2octou1.gif http://img103.imageshack.us/img103/1496/sccontest2octou1.gif http://img103.imageshack.us/img103/1496/sccontest2octou1.gif http://img143.imageshack.us/img143/3755/destroyae4.png http://img141.imageshack.us/img141/3081/comics3od3.gif http://img118.imageshack.us/img118/181/sccontest1octdt9.gif SE VUOI AVERE RENS PER RISORSE, TUTORIAL, DEMO, ECC... LEGGI QUI Link to comment Share on other sites More sharing options...
André LaCroix Posted December 28, 2007 Share Posted December 28, 2007 Perchè all'inizio metti @number = rand(GAME_OVER_NUMBER)+1?Non puoi far iniziare il numero da 0, invece che da uno?Però è utile sìsì (Sì, sono l'AnteroLehtinen che bazzica in chat. E... sì, una volta insegnavo storyboarding.)http://img26.imageshack.us/img26/7048/firmadn.png Link to comment Share on other sites More sharing options...
Soul Eater Posted December 28, 2007 Share Posted December 28, 2007 Niente male come script Targhettehttp://www.rpg2s.net/awards/mostpolite2.jpghttp://www.rpg2s.net/awards/mostpresent1.jpghttp://i51.tinypic.com/2mfnpt2.png http://www.rpg2s.net/dax_games/r2s_regali5.png Link to comment Share on other sites More sharing options...
Belxebu Posted February 9, 2008 Share Posted February 9, 2008 Vorrei richiedere una piccola modifica a questo script:vorrei compatibilizzarlo con questo:#============================================================================== # ** Scene_Gameover by Kanta fixxato by Rinnegatamante #============================================================================== # www.rpgart.org #------------------------------------------------------------------------------ # Questa classe gestisce la schermata di Game Over #============================================================================== class Scene_Gameover #-------------------------------------------------------------------------- # * Processo principale #-------------------------------------------------------------------------- def main # Visualizza l'immagine del Game Over @sprite = Sprite.new @sprite.bitmap = RPG::Cache.gameover($data_system.gameover_name) # Ferma i BGM e i BGS $game_system.bgm_play(nil) $game_system.bgs_play(nil) # Riproduce il ME del Game Over $game_system.me_play($data_system.gameover_me) # Creiamo la finestra con le opzioni Carica, Torna al Titolo e Chiudi Programma s1 = "Carica Partita" s2 = "Torna al menù principale" s3 = "Esci dal gioco" @command_window = Window_Command.new(192, [s1, s2, s3 ]) @command_window.back_opacity = 160 @command_window.x = 0 @command_window.y = 480 - @command_window.height # Se almeno un file di salvataggio esiste, allora il caricamento è abilitato @continue_enabled = false for i in 0..99 if FileTest.exist?("Saves/Save#{i+1}.rxdata") @continue_enabled = true end end # Esegue la transizione Graphics.transition(120) # Loop principale (esegue all'infinito) loop do # Aggiorna lo schermo Graphics.update # Aggiorna l'input da tastiera Input.update # Aggiorna la finestra update # Se cambia la classe, termina il processo di questa classe if $scene != self break end end # Prepara per la transizione Graphics.freeze # Dispone l'immagine e la finestra @sprite.bitmap.dispose @sprite.dispose @command_window.dispose # Esegue la transizione Graphics.transition(40) # Prepara la transizione Graphics.freeze # If battle test if $BTEST $scene = nil end end #-------------------------------------------------------------------------- # * Aggiornamento #-------------------------------------------------------------------------- def update @command_window.update if Input.trigger?(Input::C) case @command_window.index when 0 carica when 1 titolo when 2 chiudi end end end #------------------------------------------------------------------------- # * Comandi aggiuntivi #------------------------------------------------------------------------- def carica # Quando "Carica" è disabilitato unless @continue_enabled # Suona SE Azione impossibile $game_system.se_play($data_system.buzzer_se) return end # Suona SE Azione $game_system.se_play($data_system.decision_se) # Passa alla scena del caricamento $scene = Scene_LoadGameOver.new end def titolo # Esegui SE $game_system.se_play($data_system.decision_se) # Vai al titolo+ $scene = Scene_Title.new end def chiudi # Esegui SE $game_system.se_play($data_system.decision_se) # Dissolvenza sonoro Audio.bgm_fade(800) Audio.bgs_fade(800) Audio.me_fade(800) # Chiusura applicazione $scene = nil end endmi da errore linea 71... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now