Aller à la page 1 2
Reprise du message précédent:
Mack -
posté le 15/11/2012 à 18:51:57 (2235 messages postés)
| | Fichier => Compiler le jeu => Décoche toute les cases.
Après tu vas sur un site d'upload, perso, j'utilises Mediafire, et après tu m'envoies le lien qu'il te donne.
|
( Je prend note de tout les commentaires, même si je n'y répond pas ) | Suite du sujet:
arttroy -
posté le 15/11/2012 à 18:54:55 (2394 messages postés)
| Just working | Ok je te fait ça de suite.
Bon c'est en train de se préparer mais le dossier est un peu lourd... presque 18Mo... j'aurais peut être dû te le préciser...
http://www.2shared.com/file/uL863Kxn/Hidden_World_CAM.html
Voilà merci de m'aider.
Alors une chose est sûre le souci vient de ma Window, j'ai retesté uniquement à l'update de celle ci, ça ne me renvoie que la valeur de la variable "@lvl_actuel" (1) et ce à chaque fois que j'entre dans le skill menu.
La condition pour "@util_actuel" n'est même pas prise en compte
Edit : J'ai changé l'update de la fenêtre :
1
2
3
4
5
6
7
8
9
10
11
| def update
super
if @lvl_actuel != $game_variables[61]
refresh
p @lvl_actuel
else @util_actuel != $game_variables[59]
refresh
p @util_actuel
end
end
|
Alors là ça m'affiche une fois la valeur de la variable [61] (à l'entrée dans le menu ça me revoie bien "1"). Cette fois la deuxième variable est bien prise en compte (succession de 1 dans la console) et si j'utilise "soin" la variable[59] augmente bien de "1" quand je retourne dans le menu et l'affichage change bien (une fois "1" pour la variable [61] et succession de "2" pour la variable [59]).
En gros le problème c'est qu'à chaque refresh, la fenêtre s'actualise bien mais ré-affiche systématiquement les variables [61] et [59]. Par contre si la valeur de l'index change, celles de "@lvl_actuel" et "@util_actuel"aussi (puisque je les rend égales à d'autres variables à ce moment là), cependant leurs valeurs restent celles des variables [61] et [59].
Ben oui ! Puisque dans le refresh c'est à ces variables qu'on les rend égales!
Donc au final les deux parties de code fonctionnent mais indépendamment l'une de l'autre. 
|
Anti-inconstructivité / Pétition pour que le mot making soit inscrit dans le dictionnaire ? |
Mack -
posté le 16/11/2012 à 11:36:13 (2235 messages postés)
| | C'était normal que ça marchait pas, tu regardais toujours par rapport aux variables du feu.
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
| class Scene_HWSkill < Scene_ItemBase
attr_accessor :lvl_actuel
attr_accessor :util_actuel
def start
super
create_help_window
create_background
create_actor_window
create_command_window
create_status_window
create_item_window
create_background_image
create_background_image_b
create_pierre_window
@command_window.index = 0
if Input.trigger?(:RIGHT)
@command_window.index += 1
elsif Input.trigger?(:LEFT)
@command_window.index -= 1
end
create_image_pierres
end
def terminate
super
dispose_background
dispose_background_image
dispose_background_image_b
dispose_pierre_system
end
def create_background
@sprite_menu = Sprite.new
@sprite_menu.bitmap = Cache.picture("fond menu base 4")
@sprite_menu.x = 270
@sprite_menu.y = 115
@sprite_menu.z = 4
end
def dispose_background
@sprite_menu.dispose
end
def create_background_image
@sprite = Sprite.new
@sprite.bitmap = Cache.picture("fond")
end
def dispose_background_image
@sprite.dispose
end
def create_background_image_b
@sprite_b = Sprite.new
@sprite_b.bitmap = Cache.picture("fond menu base 3")
@sprite_b.x = 100
@sprite_b.y = 115
end
def dispose_background_image_b
@sprite_b.dispose
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
wy = @help_window.height
@command_window = Window_SkillCommand.new(0, wy)
@command_window.viewport = @viewport
@command_window.help_window = @help_window
@command_window.actor = @actor
@command_window.set_handler(:skill, method(:command_skill))
@command_window.set_handler(:cancel, method(:return_scene))
@command_window.set_handler(:pagedown, method(:next_actor))
@command_window.set_handler(:pageup, method(:prev_actor))
end
#--------------------------------------------------------------------------
# * Create Status Window
#--------------------------------------------------------------------------
def create_status_window
y = @help_window.height
@status_window = Window_SkillStatus.new(@command_window.width, y)
@status_window.opacity = 0
@status_window.back_opacity = 0
@status_window.viewport = @viewport
@status_window.actor = @actor
end
#--------------------------------------------------------------------------
# * Create Item Window
#--------------------------------------------------------------------------
def create_item_window
wx = 0
wy = @status_window.y + @status_window.height
ww = Graphics.width
wh = Graphics.height - wy
@item_window = Window_SkillList.new(370, 300, 250, wh)
@item_window.actor = @actor
@item_window.viewport = @viewport
@item_window.help_window = @help_window
# @help_window.visible = false
@item_window.set_handler(:ok, method(:on_item_ok))
@item_window.set_handler(:cancel, method(:on_item_cancel))
@command_window.skill_window = @item_window
@item_window.opacity = 0
@item_window.back_opacity = 0
end
def create_image_pierres
@sprite_pierre = Sprite.new
@sprite_pierre.bitmap = Cache.picture("")
@sprite_pierre.x = 370
@sprite_pierre.y = 160
@sprite_pierre.z = 4
update
end
def create_pierre_window
@niveau_window = Window_Pierre_Niveau.new(0, 308, self)
end
def update
super
@niveau_window.update
update_pierre_system
end
def update_pierre_system
if @command_window.index == 0 and $game_party.item_number($data_armors[61])>0
@sprite_pierre.bitmap = Cache.picture("EcriturePierreFeu")
@lvl_actuel = $game_variables[60]
@util_actuel = $game_variables[58]
end
if @command_window.index == 1 and $game_party.item_number($data_armors[62])>0
@sprite_pierre.bitmap = Cache.picture("EcriturePierreEau")
@lvl_actuel = $game_variables[61]
@util_actuel = $game_variables[59]
end
if @command_window.index == 2 and $game_party.item_number($data_armors[63])>0
@sprite_pierre.bitmap = Cache.picture("EcriturePierreTerre")
@lvl_actuel = $game_variables[63]
@util_actuel = $game_variables[62]
end
if @command_window.index == 3 and $game_party.item_number($data_armors[64])>0
@sprite_pierre.bitmap = Cache.picture("EcriturePierreVent")
@lvl_actuel = $game_variables[65]
@util_actuel = $game_variables[64]
end
if @command_window.index == 4 and $game_party.item_number($data_armors[65])>0
@sprite_pierre.bitmap = Cache.picture("EcriturePierreFoudre")
@lvl_actuel = $game_variables[67]
@util_actuel = $game_variables[66]
end
end
def dispose_pierre_system
@sprite_pierre.dispose
end
#--------------------------------------------------------------------------
# * Get Skill's User
#--------------------------------------------------------------------------
def user
@actor
end
#--------------------------------------------------------------------------
# * [Skill] Command
#--------------------------------------------------------------------------
def command_skill
@item_window.activate
@item_window.select_last
end
#--------------------------------------------------------------------------
# * Item [OK]
#--------------------------------------------------------------------------
def on_item_ok
@actor.last_skill.object = item
determine_item
end
#--------------------------------------------------------------------------
# * Item [Cancel]
#--------------------------------------------------------------------------
def on_item_cancel
@item_window.unselect
@command_window.activate
end
#--------------------------------------------------------------------------
# * Play SE When Using Item
#--------------------------------------------------------------------------
def play_se_for_item
Sound.play_use_skill
end
#--------------------------------------------------------------------------
# * Use Item
#--------------------------------------------------------------------------
def use_item
super
@status_window.refresh
@item_window.refresh
end
#--------------------------------------------------------------------------
# * Change Actors
#--------------------------------------------------------------------------
def on_actor_change
@command_window.actor = @actor
@status_window.actor = @actor
@item_window.actor = @actor
@command_window.activate
end
end
class Window_Pierre_Niveau < Window_Base
def initialize(x, y, scene)
super(420, 180, 220, 150)
self.opacity = 0
self.back_opacity = 0
self.contents.font.size = 20
self.contents.font.name = "Karate"
self.contents.font.color = normal_color
@scene = scene
update
refresh
end
def refresh
self.contents.clear
@lvl = @scene.lvl_actuel
@util = @scene.util_actuel
self.contents.draw_text(25, 0, 100, contents.height, "Nv : " + @scene.lvl_actuel.to_s, 2)
self.contents.draw_text(-50, 20, 200, contents.height, " Utilisations : " + @scene.util_actuel.to_s, 2)
end
def update
super
if @lvl != @scene.lvl_actuel or @util != @scene.util_actuel
refresh
end
end
end |
|
( Je prend note de tout les commentaires, même si je n'y répond pas ) |
arttroy -
posté le 16/11/2012 à 12:33:35 (2394 messages postés)
| Just working | Oui c'est ce que je m'était dis aussi (après 2 heures de recherches...), l'ennui c'est que je ne savais pas comment faire.
Bon ben je retranscris tout ça et je vais pouvoir passer aux derniers ajustements pour le Scene_skill. Merci beaucoup de ton aide, un nouveau problème de régler grâce à toi.
Sinon pour l'instant ça te paraît cohérent la manière dont je fais les choses pour mon projet? (vu que tu as pu avoir un œil dessus...).
Edit : Nickel, ça fonctionne impeccable merci encore.
|
Anti-inconstructivité / Pétition pour que le mot making soit inscrit dans le dictionnaire ? | Aller à la page 1 2Index du forum > Entraide > [RESOLU] [Rmvx Ace][Script] Où dois-je créer ma fenêtre ?


|