Últimos temas
» Script de menupor maxi Jue 04 Dic 2014, 1:44 pm
» Ayuda intro animado!!!
por maxi Miér 03 Dic 2014, 9:41 pm
» ayuda con este engin
por maxi Miér 03 Dic 2014, 8:42 am
» Hud de Vida 100% Personalizable - Engine Sencillo! Sin Scripts :)
por davidaikago Jue 20 Nov 2014, 10:58 am
» Ultimate parallax control by:GDS [ace]
por arellano Miér 08 Oct 2014, 8:28 pm
» Script Touhou (animated) Map name (v1.4)
por davidaikago Miér 08 Oct 2014, 2:09 pm
» tutorial puerta nueva
por davidaikago Miér 08 Oct 2014, 9:08 am
» cámara de fotos
por davidaikago Miér 08 Oct 2014, 9:05 am
» Imperial Action System II Demo
por davidaikago Miér 08 Oct 2014, 8:47 am
» VE Batalla animada [ACE]
por FhierusIV Jue 18 Sep 2014, 10:57 am
» Nuevo Reglamento del Foro [Vigente desde Septiembre 2014]
por maxi Miér 17 Sep 2014, 8:37 am
» MOG|Animated Title
por Souta21 Mar 09 Sep 2014, 7:24 pm
» Tutorial Engine - Cambiar Character al Equipar Objeto
por maxi Lun 21 Jul 2014, 10:19 am
» Script de climas
por gambasoxd Sáb 19 Jul 2014, 8:58 am
» Script de contraseña(codigo) para abrir un cofre
por rpgame Jue 03 Jul 2014, 6:03 pm
¿Quién está en línea?
En total hay 1 usuario en línea: 0 Registrados, 0 Ocultos y 1 Invitado Ninguno
El record de usuarios en línea fue de 117 durante el Mar 09 Ago 2011, 3:39 pm
Script de eleccion despues del game over
+3
TigreX
scartdawn
maxi
7 participantes
RPG maker VX :: Scripts ::
Página 1 de 1.
Script de eleccion despues del game over
- Código:
#================================Metal Forest inc==============================
#=====================================Presents=================================
# ** Scene_Gameover menu
# ** Created by maxinm
#------------------------------------------------------------------------------
# This class performs game over screen processing.
#==============================================================================
class Scene_Gameover
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Make game over graphic
@sprite = Sprite.new
@sprite.bitmap = Cache.system("GameOver")
# Stop BGM and BGS
RPG::BGM.stop
RPG::BGS.stop
# Play game over ME
$data_system.gameover_me.play
# Execute transition
Graphics.transition(120)
# Make command window
s1 = "Cargar juego"
s2 = "Salir del juego"
s3 = "Volver a Pantalla de Título"
@command_window = Window_Command.new(267, [s1, s2, s3])
@command_window.x = 345 - @command_window.width / 2
@command_window.y = 332 - @command_window.height / 2
@command_window.contents_opacity = 0
@command_window.back_opacity = 0
@command_window.opacity = 0
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of game over graphic
@sprite.bitmap.dispose
@sprite.dispose
@command_window.dispose
# Execute transition
Graphics.transition(40)
# Prepare for transition
Graphics.freeze
# If battle test
if $BTEST
$scene = nil
end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update command window
@command_window.update
if @command_window.contents_opacity <= 255
@command_window.contents_opacity += 2.5
@command_window.back_opacity += 2.5
@command_window.opacity += 0
end
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0 # to load menu
$scene = Scene_File.new(false, false, true)
when 1 # quit game
command_shutdown
when 2 # back to title screen
$scene = Scene_Title.new
end
return
end
end
#--------------------------------------------------------------------------
# * Process When Choosing [To Load] Command
#--------------------------------------------------------------------------
def command_to_load
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Fade out BGM, BGS, and ME
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# Switch to title screen
$scene = Scene_Load2.new
end
#--------------------------------------------------------------------------
# * Process When Choosing [Shutdown] Command
#--------------------------------------------------------------------------
def command_shutdown
# Play decision SE
$data_system.gameover_me.play
# Fade out BGM, BGS, and ME
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# Shutdown
$scene = nil
end
#--------------------------------------------------------------------------
# * Process When Choosing [menu] Command
#--------------------------------------------------------------------------
def command_menu
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to menu screen
$scene = Scene_Title.new(5)
end
end
#==============================================================================
# ** Scene_Load
#------------------------------------------------------------------------------
# This class performs load screen processing.
#==============================================================================
class Scene_Load2 < Scene_File
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Remake temporary object
$game_temp = Game_Temp.new
# Timestamp selects new file
$game_temp.last_file_index = 0
latest_time = Time.at(0)
for i in 0..3
filename = make_filename(i)
if FileTest.exist?(filename)
file = File.open(filename, "r")
if file.mtime > latest_time
latest_time = file.mtime
$game_temp.last_file_index = i
end
file.close
end
end
super("Which file would you like to load?")
end
#--------------------------------------------------------------------------
# * Decision Processing
#--------------------------------------------------------------------------
def on_decision(filename)
# If file doesn't exist
unless FileTest.exist?(filename)
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play load SE
$game_system.se_play($data_system.load_se)
# Read save data
file = File.open(filename, "rb")
read_save_data(file)
file.close
# Restore BGM and BGS
$game_system.bgm_play($game_system.playing_bgm)
$game_system.bgs_play($game_system.playing_bgs)
# Update map (run parallel process event)
$game_map.update
# Switch to map screen
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Cancel Processing
#--------------------------------------------------------------------------
def on_cancel
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to title screen
$scene = Scene_Gameover.new
end
#--------------------------------------------------------------------------
# * Read Save Data
# file : file object for reading (opened)
#--------------------------------------------------------------------------
def read_save_data(file)
# Read character data for drawing save file
characters = Marshal.load(file)
# Read frame count for measuring play time
Graphics.frame_count = Marshal.load(file)
# Read each type of game object
$game_system = Marshal.load(file)
$game_switches = Marshal.load(file)
$game_variables = Marshal.load(file)
$game_self_switches = Marshal.load(file)
$game_screen = Marshal.load(file)
$game_actors = Marshal.load(file)
$game_party = Marshal.load(file)
$game_troop = Marshal.load(file)
$game_map = Marshal.load(file)
$game_player = Marshal.load(file)
# If magic number is different from when saving
# (if editing was added with editor)
if $game_system.magic_number != $data_system.magic_number
# Load map
$game_map.setup($game_map.map_id)
$game_player.center($game_player.x, $game_player.y)
end
# Refresh party members
$game_party.refresh
end
end
maxi- Moderador
-
28
908
1673
156
Extras
Sobre mí:: ¿Necesitas Una Mano en el Maker VX o VX ACE? ¡Ponte en Contacto Conmigo! :)
Re: Script de eleccion despues del game over
este script te permite seleccionar que queres hacer despues del game over. (Cargar, volver al titulo o salir)
maxi- Moderador
-
28
908
1673
156
Extras
Sobre mí:: ¿Necesitas Una Mano en el Maker VX o VX ACE? ¡Ponte en Contacto Conmigo! :)
Re: Script de eleccion despues del game over
Wow muy bueno lo agrege a pri proyecto +1
TigreX- 500
-
26
1214
1679
105
Extras
Sobre mí::
Imagen del game over
[Tienes que estar registrado y conectado para ver esa imagen]
maxi- Moderador
-
28
908
1673
156
Extras
Sobre mí:: ¿Necesitas Una Mano en el Maker VX o VX ACE? ¡Ponte en Contacto Conmigo! :)
Re: Script de eleccion despues del game over
¡¡CUANDO LO COLOCO DEPUES MUERO Y APRETO UNA OPCION ME APRECE ERROR!!
victormg97- 50
-
27
84
126
13
Extras
Sobre mí::
Re: Script de eleccion despues del game over
¡¡Disculpen el doble post!! pero ¡¡HAORA YA NO ME APARECE ERROR!!
victormg97- 50
-
27
84
126
13
Extras
Sobre mí::
Re: Script de eleccion despues del game over
o.o!
encontre un error en el script..
resulta que cuando mueres, y le das en cargar juego..
y luego aprietas "x" regresas al mapa donde moriste...
la cuestion ahora es que no tienes vida... tu barra de PV esta vacia, y tu estado dice que estas muerto X_X
D8!!!
[Tienes que estar registrado y conectado para ver esa imagen]
encontre un error en el script..
resulta que cuando mueres, y le das en cargar juego..
y luego aprietas "x" regresas al mapa donde moriste...
la cuestion ahora es que no tienes vida... tu barra de PV esta vacia, y tu estado dice que estas muerto X_X
D8!!!
[Tienes que estar registrado y conectado para ver esa imagen]
Invark- 500
-
31
632
292
15
Re: Script de eleccion despues del game over
zombis!!! muerto o vivo??
xD pues podrias poner un evento en los mapas que ayan battlers para mejorar eso no creo que sea muy dificil
solo inicio automatico.... es cosa de injeniarselas nomas
xao..
[Tienes que estar registrado y conectado para ver esa imagen]
xD pues podrias poner un evento en los mapas que ayan battlers para mejorar eso no creo que sea muy dificil
solo inicio automatico.... es cosa de injeniarselas nomas
xao..
[Tienes que estar registrado y conectado para ver esa imagen]
TigreX- 500
-
26
1214
1679
105
Extras
Sobre mí::
Re: Script de eleccion despues del game over
muy bien amigo me ayudo mucho gracias :D
demetrio ds- 0
-
32
8
8
0
Temas similares
» Ruby-In-Game
» [Script VX] SM Game Resolution.
» Hp 1 despues de Morir
» Script: Cambio de Clase Sencillo(CCS) V.1.0.0Mi primer script.
» [Script VX] SM Game Resolution.
» Hp 1 despues de Morir
» Script: Cambio de Clase Sencillo(CCS) V.1.0.0Mi primer script.
RPG maker VX :: Scripts ::
Página 1 de 1.
Permisos de este foro:
No puedes responder a temas en este foro.