
Cela m'aiderai tellement :')
Enfin bon je vais prier haha
mais merci de me prévenir ^^
<> Script : $on_map_call = false
<> Condition : Interrupteur [0025: Nuzlocke ON] == Activé
<> Condition : Script $pokemon_party.dead?
<> Script : for i in 0..5
: if $pokemon_party.actors[i].hp <= 0
: $pokemon_party.actors[i].remove
<>
: Fin condition
<>
: Fin condition
<>
---------- Erreur de script : évènement ----------
----- Type
SyntaxError
----- Message
(eval):3:in `command_355'compile error
(eval):3: syntax error
----- Position de l'évènement
MAP 6 EVENT 0
SCRIPT
for i in 0..5
if $pokemon_party.actors[i].hp <= 0
$pokemon_party.actors[i].remove
----- Backtrace
Script : Interpreter Bis | Ligne : 444 | Méthode : in `command_355'
Script : Interpreter 2 | Ligne : 215 | Méthode : in `eval'
Script : Interpreter Bis | Ligne : 444 | Méthode : in `command_355'
Script : Interpreter 2 | Ligne : 215 | Méthode : in `execute_command'
Script : Interpreter 1 | Ligne : 199 | Méthode : in `update'
Script : Interpreter 1 | Ligne : 113 | Méthode : in `loop'
Script : Interpreter 1 | Ligne : 204 | Méthode : in `update'
Script : Game_CommonEvent | Ligne : 66 | Méthode : in `update'
Script : Game_Map | Ligne : 397 | Méthode : in `update'
Script : Game_Map | Ligne : 396 | Méthode : in `each'
Script : Game_Map | Ligne : 396 | Méthode : in `update'
Script : Scene_Map | Ligne : 47 | Méthode : in `alias_update'
Script : Scene_Map | Ligne : 46 | Méthode : in `loop'
Script : Scene_Map | Ligne : 59 | Méthode : in `alias_update'
Script : MAPPANEL | Ligne : 90 | Méthode : in `update'
Script : Scene_Map | Ligne : 25 | Méthode : in `main'
Script : Scene_Map | Ligne : 19 | Méthode : in `loop'
Script : Scene_Map | Ligne : 30 | Méthode : in `main'
Script : Main | Ligne : 52
$pokemon_party.actors.delete_if { |pkmn| pkmn and pkmn.hp == 0 }
begin
@idList = []
for i in 0..$pokemon_party.size-1
if $pokemon_party.actors[i].dead
@idList[i] = i
end
@idList.compact!
end
for i in 0..@idList.size-1
pokemon = $pokemon_party.actors[@idList[i]]
pokemon_existant? ($game_variables[31])
$game_variables[31] += 1
enregistrer_pokemon ($game_variables[31], #{pokemon.id.to_i}, #{pokemon.level}, false)
else
enregistrer_pokemon ($game_variables[31], #{pokemon.id.to_i}, #{pokemon.level}, false)
end
$pokemon_party.actors[idList[i]].delete
end
end
---------- Erreur de script : évènement ----------
----- Type
SyntaxError
----- Message
(eval):19:in `command_355'compile error
(eval):14: syntax error
(eval):19: syntax error
----- Position de l'évènement
MAP 11 EVENT 16
SCRIPT
begin
@idList = []
for i in 0..$pokemon_party.size-1
if $pokemon_party.actors[i].dead
@idList[i] = i
end
@idList.compact!
end
for i in 0..@idList.size-1
pokemon = $pokemon_party.actors[@idList[i]]
pokemon_existant? ($game_variables[31])
$game_variables[31] += 1
enregistrer_pokemon ($game_variables[31], (pokemon.id.to_i).to_s, pokemon.level.to_s, false)
else
enregistrer_pokemon ($game_variables[31], (pokemon.id.to_i).to_s, pokemon.level.to_s, false)
end
$pokemon_party.actors[idList[i]].delete
end
end
----- Backtrace
Script : Interpreter Bis | Ligne : 444 | Méthode : in `command_355'
Script : Interpreter 2 | Ligne : 215 | Méthode : in `eval'
Script : Interpreter Bis | Ligne : 444 | Méthode : in `command_355'
Script : Interpreter 2 | Ligne : 215 | Méthode : in `execute_command'
Script : Interpreter 1 | Ligne : 199 | Méthode : in `update'
Script : Interpreter 1 | Ligne : 113 | Méthode : in `loop'
Script : Interpreter 1 | Ligne : 204 | Méthode : in `update'
Script : Scene_Map | Ligne : 48 | Méthode : in `alias_update'
Script : Scene_Map | Ligne : 46 | Méthode : in `loop'
Script : Scene_Map | Ligne : 59 | Méthode : in `alias_update'
Script : MAPPANEL | Ligne : 90 | Méthode : in `update'
Script : Scene_Map | Ligne : 25 | Méthode : in `main'
Script : Scene_Map | Ligne : 19 | Méthode : in `loop'
Script : Scene_Map | Ligne : 30 | Méthode : in `main'
Script : Main | Ligne : 52
attr_accessor :dead_pokemon
Normalement, dans ce même script tu devrais avoir un "def initialize", juste après cette ligne, tu écris :@dead_pokemon = []
Normalement quand tu feras une nouvelle partie tu auras les données préinitialisées. (Si tu continue les parties existante, tu auras un bug parce que la variable n'existait pas avant, pour les joueur de ton projet, s'ils n'avaient pas le projet avant aujourd'hui ils n'auront pas de bug).$pokemon_party.actors.delete_if do |pokemon|
next(false) unless pokemon
if(pokemon.dead?)
$pokemon_party.dead_pokemon << pokemon
next(true)
end
next(false)
end
$pokemon_party.actors.compact!
pokemon = $pokemon_party.dead_pokemon[index]
index est un numéro. Tu dois vérifier qu'il n'est pas supérieur ou égal à $pokemon_party.dead_pokemon.size@party_window = []
for i in 0..($pokemon_party.dead_pokemon.size-1)
pokemon = $pokemon_party.dead_pokemon[@order[i]]
@party_window.push(Pokemon_Party_Window.new(pokemon, i, @z_level, @mode, @data))
end
scene = Pokemon_Status.new(pokemon, 0, 1100)
scene.main
@pokemon_sprite.bitmap = RPG::Cache.battler(@pokemon.battler_face, 0)
a la ligne 373 du script pokemon_status. Je n'en ai pas bien saisi les détails en revanche ^^scene = Pokemon_Status.new(pokemon, -1, 1100)
scene.main
Ca empêchera la navigation dans l'équipe normalement ^^class DeadPokemon_Display
GreyColor = Color.new(128, 128, 128, 128)
def initialize
@text_sprite = Sprite.new
@text_sprite.z = 10001
@text_sprite.bitmap = Bitmap.new(640, 480)
@sprite = Sprite.new
@sprite.z = 10001
@sprite.x = 320
@sprite.y = 240
@running = true
@locked = false
@index = -1
end
def main
fill_bitmap
if $pokemon_party.dead_pokemon.size == 0
@text_sprite.bitmap.draw_text(0, 0, 640, 480, "Vous n'avez pas perdu de Pokémon.", 1)
@locked = true
else
update_pokemon(1)
end
while @running
Graphics.update
Input.update
update
end
dispose
end
def update
return @running = false if Input.trigger?(Input::B)
return if @locked
update_pokemon(1) if Input.trigger?(Input::RIGHT)
update_pokemon(-1) if Input.trigger?(Input::LEFT)
if Input.trigger?(Input::C)
scene = Pokemon_Status.new($pokemon_party.dead_pokemon[@index], -1, 1100)
scene.main
end
end
def update_pokemon(add)
@index += add
if @index < 0
@index = $pokemon_party.dead_pokemon.size - 1
elsif @index >= $pokemon_party.dead_pokemon.size
@index = 0
end
return @running = false unless $pokemon_party.dead_pokemon[@index] #> Gros problème
fill_bitmap
pokemon = $pokemon_party.dead_pokemon[@index]
@sprite.bitmap = RPG::Cache.battler(@pokemon.battler_face, 0)
@sprite.ox = @sprite.bitmap.width / 2
@sprite.oy = @sprite.bitmap.height / 2
y = 240 + @sprite.oy
@text_sprite.bitmap.draw_text(0, y, 640, 32, "#{pokemon.given_name} Nv.#{pokemon.level}", 1)
end
def fill_bitmap
@text_sprite.bitmap.clear
@text_sprite.bitmap.fill_rect(0, 0, 640, 480, GreyColor)
end
def dispose
@text_sprite.bitmap.dispose
@text_sprite.dispose
@sprite.dispose
end
end
Il faut ajouter ce script sur sur la pierre tombale ajoute la commande :DeadPokemon_Display.new.main
@wait_count = 2
J'ai pas testé le script ^^