❤ 0 Nom du script : Game Over Common Event
Réalisé par : Kread-EX
Version proposé : 1.02
Effet : Permet de lancer un évènement commun après un game over (Dans un combat, quand le groupe perd tous les points de vie sur la map, mais ne fonctionne pas avec l'option d’évènementiel "game over")
Par défaut c'est le 1er évènement commun qui est joué mais vous pouvez changer ça.
Dans l'appelle des scripts :
$game_system.game_over_event_id = x
x est le numéros id de l'évènement commun que vous voulez utiliser.
Termes d'utilisation de l'auteur :
You are free to adapt this work to suit your needs.
You can use this work for commercial purposes if you like it.
(Vous pouvez modifier le script et l'utiliser dans un projet commercial.)
Lien : Lien sur Rpg Revolution
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
| #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# ▼ Game Over Common Event
# Author: Kread-EX
# Version 1.02
# Release date: 17/12/2011
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#-------------------------------------------------------------------------------------------------
# ▼ UPDATES
#-------------------------------------------------------------------------------------------------
# # 19/12/2011. Added the option to replay Map BGM.
# # 18/12/2011. Fixed an infinite loop.
#-------------------------------------------------------------------------------------------------
# ▼ TERMS OF USAGE
#-------------------------------------------------------------------------------------------------
# # None. Made that in a few minutes.
#-------------------------------------------------------------------------------------------------
# ▼ INTRODUCTION
#-------------------------------------------------------------------------------------------------
# # Overrides the standard Game Over with a common event on the map.
#-------------------------------------------------------------------------------------------------
# ▼ INSTRUCTIONS
#-------------------------------------------------------------------------------------------------
# # By default, use the 1st common event as game over. You can change this with a
# # script call:
# # $game_system.game_over_event_id = x
# # To disable the replay of the map bgm:
# # $game_system.game_over_map_bgm = false
# #
# # Note: The Game Over event command will not trigger the common event.
#-------------------------------------------------------------------------------------------------
# ▼ COMPATIBILITY
# # I don't foresee any problems.
#-------------------------------------------------------------------------------------------------
puts 'Load: Game Over Common Event v1.02 by Kread-EX'
#===========================================================================
# ■ SceneManager
#===========================================================================
module SceneManager
#--------------------------------------------------------------------------
# ● Jump to a scene
#--------------------------------------------------------------------------
class << self; alias_method(:krx_goce_sm_goto, :goto); end
def self.goto(scene_class)
if scene_class == Scene_Gameover
unless $game_temp.no_game_over_ce || $game_system.game_over_event_id == -1
id = $game_system.game_over_event_id
$game_temp.reserve_common_event(id != nil ? id : 1)
$game_party.members.each do |mem|
mem.remove_state(1)
end
if @scene.is_a?(Scene_Battle) && $game_system.game_over_map_bgm
BattleManager.replay_bgm_and_bgs
end
scene_class = Scene_Map
end
end
$game_temp.no_game_over_ce = false
krx_goce_sm_goto(scene_class)
end
end
#===========================================================================
# ■ Game_Temp
#===========================================================================
class Game_Temp
#--------------------------------------------------------------------------
# ● Public instance variables
#--------------------------------------------------------------------------
attr_accessor :no_game_over_ce
end
#===========================================================================
# ■ Game_System
#===========================================================================
class Game_System
#--------------------------------------------------------------------------
# ● Public instance variables
#--------------------------------------------------------------------------
attr_accessor :game_over_event_id
attr_accessor :game_over_map_bgm
#--------------------------------------------------------------------------
# ● Object Initialize
#--------------------------------------------------------------------------
alias_method(:krx_goce_gs_init, :initialize)
def initialize
krx_goce_gs_init
@game_over_event_id = 1
@game_over_map_bgm = true
end
end
#===========================================================================
# ■ Game_Interpreter
#===========================================================================
class Game_Interpreter
#--------------------------------------------------------------------------
# ● Game Over
#--------------------------------------------------------------------------
alias_method(:krx_goce_gi_353, :command_353)
def command_353
$game_temp.no_game_over_ce = true
krx_goce_gi_353
end
end |
|