Titre: Probleme dans un script
Plate forme: XP
Version: RPG Maker XP Englais
Question posée: J'ai installer un script de Moghunter dans mon projet en cour et ils me dissent qu'il y a un erreur mais, je ne comprend pas cette erreur si un/une personne pourais m'aider sa serai vraiment aprécier.Merci davance!
Voici l'erreur: Script Mog_Domage System ne fonctione pas à la ligne 248 'NameError' undefined local variable or method 'update_animation' for # <Sprite_battler: 0x16f1d8>
Et je vous passe le Script en question:
##########################################
# Mog Damage System V 1.0 (By Moghunter) #
##########################################
# moonglesoft@yahoo.com.br #
##########################################
# Apresentação de dano com efeitos de Zoom e Rotações.
# Colapsos animados(Quando o inimigo perece).
##############
#Customização#
##############
module MOG
################################################################################
#Tipos de efeitos.
#
# 0 = Zoom com rotação.
# 1 = Zoom IN e OUT.
# 2 = Zoom OUT.
# 3 = Sem Gravidade.
# 4 = Com Gravidade.
# 5 = Fantasma.
# 6 = Normal.
#
################################################################################
TYPE = 0
################################################################################
#Tipos de Colapsos
#
#0 = Zoom na vertical
#1 = Zoom na horizontal
#2 = Zoom na vertical e na horizontal
#3 = Rotação
#4 = Normal
################################################################################
TYPE_COL = 0
################################################################################
#Nome da Fonte.
FONT_NAME = "Arial Black"
#Tamanho da Fonte.
FONT_SIZE = 30
#Tamanho da Fonte do dano crÃtico.
FONT_SIZE_CRITICAL = 20
#String do dano crÃtico.
CRITICAL_NAME = "Critical"
#Cor da fonte do dano.
FONT_COLOR_DAMAGE = Color.new(255, 255, 255)
#Cor da fonte do dano de cura.
FONT_COLOR_HEAL = Color.new(176, 255, 144)
#Cor da fonte do dano crÃtico
FONT_COLOR_CRITICAL = Color.new(255, 0, 0)
################################################################################
#Default(ZOOM_OUT = 0.1 / ZOOM_IN = 0.08 / ROT = 24 / DUR = 0)
################################################################################
#Zoom Externo
ZOOM_OUT = 0.1
#Zoom Interno
ZOOM_IN = 0.08
#Velocidade da Rotação
ROT = 24
#Duração extra do dano.
DUR = 0
################################################################################
end
module RPG
class Sprite < ::Sprite
def damage(value, critical)
dispose_damage
if value.is_a?(Numeric)
damage_string = value.abs.to_s
else
damage_string = value.to_s
end
bitmap = Bitmap.new(160, 48)
bitmap.font.name = MOG::FONT_NAME
bitmap.font.size = MOG::FONT_SIZE
bitmap.font.color.set(0, 0, 0)
bitmap.draw_text(-1, 12-1, 160, 36, damage_string, 1)
bitmap.draw_text(+1, 12-1, 160, 36, damage_string, 1)
bitmap.draw_text(-1, 12+1, 160, 36, damage_string, 1)
bitmap.draw_text(+1, 12+1, 160, 36, damage_string, 1)
if value.is_a?(Numeric) and value < 0
bitmap.font.color = MOG::FONT_COLOR_HEAL
else
bitmap.font.color = MOG::FONT_COLOR_DAMAGE
end
bitmap.draw_text(0, 12, 160, 36, damage_string, 1)
if critical
bitmap.font.size = MOG::FONT_SIZE_CRITICAL
bitmap.font.color = MOG::FONT_COLOR_CRITICAL
bitmap.draw_text(-1, -1, 160, 20, MOG::CRITICAL_NAME, 1)
bitmap.draw_text(+1, -1, 160, 20, MOG::CRITICAL_NAME, 1)
bitmap.draw_text(-1, +1, 160, 20, MOG::CRITICAL_NAME, 1)
bitmap.draw_text(+1, +1, 160, 20, MOG::CRITICAL_NAME, 1)
bitmap.font.color.set(255, 255, 255)
bitmap.draw_text(0, 0, 160, 20, MOG::CRITICAL_NAME, 1)
end
@_damage_sprite = ::Sprite.new(self.viewport)
@_damage_sprite.bitmap = bitmap
@_damage_sprite.ox = 80
@_damage_sprite.oy = 20
@_damage_sprite.x = self.x
@_damage_sprite.y = self.y - self.oy / 2
@_damage_sprite.z = 3000
@_damage_duration = 40 + MOG::DUR
end
def update
super
if @_whiten_duration > 0
@_whiten_duration -= 1
self.color.alpha = 128 - (16 - @_whiten_duration) * 10
end
if @_appear_duration > 0
@_appear_duration -= 1
self.opacity = (16 - @_appear_duration) * 16
end
if @_escape_duration > 0
@_escape_duration -= 1
self.opacity = 256 - (32 - @_escape_duration) * 10
end
if @_collapse_duration > 0
@_collapse_duration -= 1
self.opacity = 256 - (48 - @_collapse_duration) * 6
if MOG::TYPE_COL == 0
self.zoom_x -= 0.02
self.zoom_y += 0.5
elsif MOG::TYPE_COL == 1
self.zoom_x += 0.5
self.zoom_y -= 0.05
elsif MOG::TYPE_COL == 2
if @_collapse_duration > 20
self.zoom_y -= 0.06
self.zoom_x += 0.01
else
self.zoom_x -= 0.115
self.zoom_y += 0.3
end
elsif MOG::TYPE_COL == 3
self.zoom_x -= 0.04
self.zoom_y += 0.04
self.angle += 10
else
end
end
if @_damage_duration > 0
@_damage_duration -= 1
if MOG::TYPE == 0
case @_damage_duration
when 38..40 + MOG::DUR
@_damage_sprite.y -= 4
@_damage_sprite.zoom_x += MOG::ZOOM_OUT
@_damage_sprite.zoom_y += MOG::ZOOM_OUT
@_damage_sprite.angle += MOG::ROT
when 36..37
@_damage_sprite.y -= 2
@_damage_sprite.zoom_x += MOG::ZOOM_OUT
@_damage_sprite.zoom_y += MOG::ZOOM_OUT
@_damage_sprite.angle += MOG::ROT
when 34..35
@_damage_sprite.y -= 2
@_damage_sprite.zoom_x += MOG::ZOOM_OUT
@_damage_sprite.zoom_y += MOG::ZOOM_OUT
@_damage_sprite.angle += MOG::ROT
when 23..33
@_damage_sprite.y -= 4
@_damage_sprite.zoom_x += MOG::ZOOM_OUT
@_damage_sprite.zoom_y += MOG::ZOOM_OUT
@_damage_sprite.angle += MOG::ROT
when 0..22
@_damage_sprite.angle = 0
@_damage_sprite.zoom_x -= MOG::ZOOM_IN
@_damage_sprite.zoom_y -= MOG::ZOOM_IN
@_damage_sprite.y -= 3
end
elsif MOG::TYPE == 1
case @_damage_duration
when 38..40 + MOG::DUR
@_damage_sprite.y -= 4
@_damage_sprite.zoom_x += MOG::ZOOM_OUT
@_damage_sprite.zoom_y += MOG::ZOOM_OUT
when 36..37
@_damage_sprite.y -= 2
@_damage_sprite.zoom_x += MOG::ZOOM_OUT
@_damage_sprite.zoom_y += MOG::ZOOM_OUT
when 34..35
@_damage_sprite.y -= 2
@_damage_sprite.zoom_x += MOG::ZOOM_OUT
@_damage_sprite.zoom_y += MOG::ZOOM_OUT
when 23..33
@_damage_sprite.y -= 4
@_damage_sprite.zoom_x += MOG::ZOOM_OUT
@_damage_sprite.zoom_y += MOG::ZOOM_OUT
when 0..22
@_damage_sprite.angle = 0
@_damage_sprite.zoom_x -= MOG::ZOOM_IN
@_damage_sprite.zoom_y -= MOG::ZOOM_IN
@_damage_sprite.y -= 3
end
elsif MOG::TYPE == 2
@_damage_sprite.y -= 1
@_damage_sprite.zoom_x += MOG::ZOOM_OUT
@_damage_sprite.zoom_y += MOG::ZOOM_OUT
elsif MOG::TYPE == 3
@_damage_sprite.y -= 3
elsif MOG::TYPE == 4
case @_damage_duration
when 30..40 + MOG::DUR
@_damage_sprite.y -= 5
when 20..29
@_damage_sprite.y += 7
when 10..19
@_damage_sprite.y -= 3
when 0..9
@_damage_sprite.y += 6
end
elsif MOG::TYPE == 5
case @_damage_duration
when 30..40 + MOG::DUR
@_damage_sprite.y -= 10
@_damage_sprite.zoom_y += MOG::ZOOM_OUT * 5
@_damage_sprite.zoom_x -= MOG::ZOOM_IN
when 20..29
@_damage_sprite.y -= 1
@_damage_sprite.zoom_y -= MOG::ZOOM_OUT * 5
@_damage_sprite.zoom_x += MOG::ZOOM_IN
when 0..19
@_damage_sprite.y -= 0
@_damage_sprite.zoom_y = 1
@_damage_sprite.zoom_x = 1
end
else
case @_damage_duration
when 38..40 + MOG::DUR
@_damage_sprite.y -= 4
when 36..37
@_damage_sprite.y -= 2
when 34..35
@_damage_sprite.y += 2
when 28..33
@_damage_sprite.y += 4
end
end
@_damage_sprite.opacity = 256 - (18 - @_damage_duration) * 12
if @_damage_duration == 0
dispose_damage
end
end
if @_animation != nil and (Graphics.frame_count % 2 == 0)
@_animation_duration -= 1
update_animation
end
if @_loop_animation != nil and (Graphics.frame_count % 2 == 0)
update_loop_animation
@_loop_animation_index += 1
@_loop_animation_index %= @_loop_animation.frame_max
end
if @_blink
@_blink_count = (@_blink_count + 1) % 32
if @_blink_count < 16
alpha = (16 - @_blink_count) * 6
else
alpha = (@_blink_count - 16) * 6
end
self.color.set(255, 255, 255, alpha)
end
@@_animations.clear
end
end
end
P.S Désoler pour les erreurs de francais