Sign in to follow this  
Followers 0
Slab

[Script] Confirmar Guardado

7 posts in this topic

Script
Simple Script que al guardar te tira una ventana si es que confirmas el guardado

Anotaciones

>NO PONER EN SCRIPT ADICIONALES

>No he traducido la base de datos del juego Test que hize del Script

>El Script no es mío

Screenie:
user posted image


Script En Spoiler


[SPOILER]#=========================================
# [VX] Save File Confirmation
#------------------------------------------------------------------------------
# by Woratana
# Tradução Angeal www.turbidos.com
#================================================

module Worale
SFC_Text_Confirm = "Confirmar" # Texto que vai aparecer na janela de confirmação
SFC_Text_Cancel = "Cancelar" # Texto que aparecera quando cancelar

SFC_Text_Confirm_Load = "Confirmar" # Texto que confirma o load
SFC_Text_Cancel_Load = "Cancelar" # Texto que cancela o load

SFC_Window_Width = 200
SFC_Window_X_Offset = 0
SFC_Window_Y_Offset = 0
end


class Scene_File < Scene_Base
def update
super
if !@confirm_window.nil?
@confirm_window.update
if Input.trigger?(Input::C)
if @confirm_window.index == 0
determine_savefile
@confirm_window.dispose
@confirm_window = nil
else
Sound.play_cancel
@confirm_window.dispose
@confirm_window = nil
end
elsif Input.trigger?(Input::B)
Sound.play_cancel
@confirm_window.dispose
@confirm_window = nil
end
else
update_menu_background
@help_window.update
update_savefile_windows
update_savefile_selection
end
end

def update_savefile_selection
if Input.trigger?(Input::C)
if @saving
Sound.play_decision
if @savefile_windows[@index].file_exist
text1 = Worale::SFC_Text_Confirm
text2 = Worale::SFC_Text_Cancel
@confirm_window = Window_Command.new(Worale::SFC_Window_Width,[text1,text2])
@confirm_window.x = ((544 - @confirm_window.width) / 2) + Worale::SFC_Window_X_Offset
@confirm_window.y = ((416 - @confirm_window.height) / 2) + Worale::SFC_Window_Y_Offset
else
determine_savefile
end
else
if @savefile_windows[@index].file_exist
Sound.play_decision
text1 = Worale::SFC_Text_Confirm_Load
text2 = Worale::SFC_Text_Cancel_Load
@confirm_window = Window_Command.new(Worale::SFC_Window_Width,[text1,text2])
@confirm_window.x = ((544 - @confirm_window.width) / 2) + Worale::SFC_Window_X_Offset
@confirm_window.y = ((416 - @confirm_window.height) / 2) + Worale::SFC_Window_Y_Offset
else
Sound.play_buzzer
end
end
elsif Input.trigger?(Input::B)
Sound.play_cancel
return_scene
else
last_index = @index
if Input.repeat?(Input::DOWN)
cursor_down(Input.trigger?(Input::DOWN))
end
if Input.repeat?(Input::UP)
cursor_up(Input.trigger?(Input::UP))
end
if @index != last_index
Sound.play_cursor
@savefile_windows[last_index].selected = false
@savefile_windows[@index].selected = true
end
end
end
end[/SPOILER] Edited by Slab
0

Share this post


Link to post
Share on other sites
Gracias por el aporte aunque puede llegar a ser un poco tostón xD

pero weno, siempre ayudará a no borra partidas por error

nos vemos icon13.gif
0

Share this post


Link to post
Share on other sites
Puede ser útil como también molesto a la hora de guardar, le daría un 7, no esta nada mal, buen aporte!
0

Share this post


Link to post
Share on other sites
para mi es exelente: que peor que perder todo tu avanze de miles de años(tal vez no en el maker pero hay otros casos)

gracias por el aport
0

Share this post


Link to post
Share on other sites
Bueno, más de una vez he borrado sin querer partidas guardadas aun con este aviso. Y eso es porque mecanizo la forma de guardar y no lo leo. xD.png
Si no os pasa como a mí, usadlo. icon13.gif
0

Share this post


Link to post
Share on other sites
jejeje justamente por eso lo pongo... pues muchas veces se me han guardado paartidas sobre otras xD
0

Share this post


Link to post
Share on other sites

dices q non lo pongamos en script adicionales, donde lo ponemos entonces??

 

aparte cuando lo voy a ejecutar me da un error q dice q hay algo mal en esta linea:

 

class Scene_File < Scene_Base

 

 

es mas, si lo pongo en scripts adicionales no me da el error, pero solo me pide confirmacion al cargar y no al guardar

 

 

EDITO:

 

Vale, ya lo he solucionao, se pq la solucion es un tonteria y se supone q deberia funcionar igual sin hacer echo eso, pero no es mi caso, lo q hice fue cambiar las lineas 9 y 10:

 

SFC_Text_Confirm_Save = "Confirmar" # Texto que vai aparecer na janela de confirmação

SFC_Text_Cancel_Save = "Cancelar" # Texto que aparecera quando cancelar

 

 

y las lineas 54 y 55

 

text1 = Worale::SFC_Text_Confirm_Save

text2 = Worale::SFC_Text_Cancel_Save

Edited by AntI-Her0
0

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0