Siemka, ostatnio zacząłem się bawić w rm vx,
i chciałem sobie przetestować w temacie wymieniony battle system.
Wszystkie skrypty przeniosłem, obrazki też następnie odpalam grę
wszystko jest ok dopóki nie ma ataku. tzn. jeśli ja dojde do przeciwnika
i zaatakuje go to wywala błąd, tak samo jeśli przeciwnik podejdzie do mnie.
Oto ten błąd:
A i jakby co to niczego nei zmieniałem w konfiguracjach
bo nie wiem jak, być może to jest przyczyna problemu.
A tutaj zakładka z której wywala błąd
(Bitmap/AnimObj)
Spoiler:
#------------------------------------------------------------------------------
# This modification is so that you can spawn new events mainly for animations in
# the battle system. Miss and summons will not work if this is not here.
#------------------------------------------------------------------------------
class Anim_Miss < Game_Event
def initialize(type = 0, anim_id = 0)
@type = type
@anim_id = anim_id
@played = false
anim = RPG::Event.new(0,0)
super($game_map.map_id, anim)
end
def animated?
return false
end
def start_anim
case @type
when 0
@animation_id = GTBS::MISS_ANIMATION #Animation ID of MISS!.. for spells that miss
when 1
@animation_id = GTBS::SUMMON_ANIM_ID #Animation ID of SPAWN.. for summons (RAISE)
else
@animation_id = @anim_id
end
@played = true
end
#alias anim_miss_update update
def update
super()
if @played == true and !@sprite.animation?
$scene.spriteset.event_sprites.delete(@sprite)
$game_map.events.delete(self)
end
end
end
class Turn_Sprite < Sprite_Base
def initialize(viewport)
@_damage_duration = 0
super(viewport)
end
def dispose_damage
if @_damage_sprite != nil
@_damage_sprite.bitmap.dispose
@_damage_sprite.dispose
@_damage_sprite = nil
@_damage_duration = 0
end
end
def update
update_damage
super
end
def update_damage
if @_damage_duration > 0
@_damage_duration -= 1
case @_damage_duration
when 38..39
@_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
@_damage_sprite.opacity = 256 - (12 - @_damage_duration) * 32
if @_damage_duration == 0
dispose_damage
end
end
end
def start_animation(animation, mirror = false, direction = 8)
@direction = direction
@turnable = animation.name.downcase.include?("[true]")
@updated = false
super(animation, mirror)
end
def animation_set_sprites(frame)
super(frame)
for i in 0..15
sprite = @animation_sprites[i]
if @turnable
d = @direction
sprite.angle += (d == 8 ? 0 : d == 6 ? 270 : d == 4 ? 90 : 180)
end
end
end
end
class Bitmap
def draw_outline_text(x,y,w,h,text,align=0,clear = 1)
color = self.font.color.clone
if clear == 1
self.font.color = Color.new(50,50,50,200)
elsif clear == 0
self.font.color = Color.new(0,0,0)
end
self.draw_text(x+1,y+1,w,h,text,align)
self.draw_text(x+1,y-1,w,h,text,align)
self.draw_text(x-1,y-1,w,h,text,align)
self.draw_text(x-1,y+1,w,h,text,align)
self.draw_text(x-1,y,w,h,text,align)
self.draw_text(x+1,y,w,h,text,align)
self.draw_text(x,y+1,w,h,text,align)
self.draw_text(x,y-1,w,h,text,align)
self.font.color = color
self.draw_text(x,y,w,h,text,align)
end
def gradation_rect(x, y, width, height, color1, color2, align = 0)
if align == 0
for i in x...x + width
red = color1.red + (color2.red - color1.red) * (i - x) / (width - 1)
green = color1.green +
(color2.green - color1.green) * (i - x) / (width - 1)
blue = color1.blue +
(color2.blue - color1.blue) * (i - x) / (width - 1)
alpha = color1.alpha +
(color2.alpha - color1.alpha) * (i - x) / (width - 1)
color = Color.new(red, green, blue, alpha)
fill_rect(i, y, 1, height, color)
end
elsif align == 1
for i in y...y + height
red = color1.red +
(color2.red - color1.red) * (i - y) / (height - 1)
green = color1.green +
(color2.green - color1.green) * (i - y) / (height - 1)
blue = color1.blue +
(color2.blue - color1.blue) * (i - y) / (height - 1)
alpha = color1.alpha +
(color2.alpha - color1.alpha) * (i - y) / (height - 1)
color = Color.new(red, green, blue, alpha)
fill_rect(x, i, width, 1, color)
end
elsif align == 2
for i in x...x + width
for j in y...y + height
red = color1.red + (color2.red - color1.red) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
green = color1.green + (color2.green - color1.green) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
blue = color1.blue + (color2.blue - color1.blue) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
alpha = color1.alpha + (color2.alpha - color1.alpha) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
color = Color.new(red, green, blue, alpha)
set_pixel(i, j, color)
end
end
elsif align == 3
for i in x...x + width
for j in y...y + height
red = color1.red + (color2.red - color1.red) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
green = color1.green + (color2.green - color1.green) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
blue = color1.blue + (color2.blue - color1.blue) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
alpha = color1.alpha + (color2.alpha - color1.alpha) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
color = Color.new(red, green, blue, alpha)
set_pixel(i, j, color)
end
end
end
end
end
________________________ Grosz do grosza a będą 2 grosze
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach Nie możesz załączać plików na tym forum Możesz ściągać załączniki na tym forum