Confirmation avant de quitter
Auteur: Korbo
Infos: Alors ce script est fait pour les malheureux qui malheuresement on eu le malheur malheureux d'appuyer sur le bouton Quitter sans le vouloir.
En bref ça vous demande si vous voulez vraiment quitter quand vous avez fait quiter
Ou le mettre :
Creez un new script au dessus de Main que vous appelerez Scene_Exit
Scripte:
- Citation :
- #=========================================================================
# ¦ Scene_Exit
#-------------------------------------------------------------------------
#Quelques modfs by Korbo
#=========================================================================
class Scene_Exit
def main
s1 = "Trop naze le jeu je pars..."
s2 = "Trop bien je Reste!"
@command_window = Window_Command.new(200, [s1, s2])
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 240 - @command_window.height / 2
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
end
def update
@command_window.update
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Title.new
return
end
if Input.trigger?(Input::C)
case @command_window.index
when 0
command_quitter
when 1
command_revenir
end
return
end
end
def command_quitter
$game_system.se_play($data_system.decision_se)
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$scene = nil
end
def command_revenir
$game_system.se_play($data_system.decision_se)
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$scene = Scene_Title.new
end
end
Ensuite allez dans le script "Scene_Title" à la ligne 170 dans le "def command_shutdown" vous voyez ceci :
- Citation :
- $scene = nil
remplacez-le par ceci :
- Citation :
- $scene = Scene_Exit.new
Après , allez dans le script Scene_End et faîtes la même chose à la ligne 97