赞 | 1 |
VIP | 392 |
好人卡 | 225 |
积分 | 46 |
经验 | 177731 |
最后登录 | 2020-12-8 |
在线时间 | 2037 小时 |
Lv3.寻梦者 虚空人形
- 梦石
- 0
- 星屑
- 4604
- 在线时间
- 2037 小时
- 注册时间
- 2011-8-11
- 帖子
- 3398
|
@后知后觉,在这里提一个问:
在使用自身+敌人的动画进行普通攻击时,如果两人不在一条水平线上显示就会出bug,
但使用真位移
的话貌似只是角色平移过去,在攻击前没有动画(本来打算使真位移和待机、死亡有单独的一套图片),我想应该是在以下地方修改:- #==============================================================================
- # ■ Game_Battler
- #==============================================================================
- class Game_Battler < Game_BattlerBase
- def set_normal_battler_name
- @battler_name = @battler_name.split(/★/)[0]
- end
- def set_beaten_battler_name
- if guard?
- if (UseActorGuardGraphic && actor?) or
- (UseEnemyGuardGraphic && enemy?)
- set_guard_battler_name
- return
- end
- end
- @battler_name = @battler_name.split(/★/)[0] + "★1"
- if UseActorWBSE && actor?
- Audio.se_play("Audio/SE/AWBSE_#{id}", 100, 100)
- elsif UseEnemyWBSE && enemy?
- Audio.se_play("Audio/SE/EWBSE_#{enemy_id}", 100, 100)
- end
- end
- def set_dead_battler_name
- @battler_name = @battler_name.split(/★/)[0] + "★2"
- end
- def set_guard_battler_name
- @battler_name = @battler_name.split(/★/)[0] + "★3"
- if UseActorGDSE && actor?
- Audio.se_play("Audio/SE/AGDSE_#{id}", 100, 100)
- elsif UseEnemyGDSE && enemy?
- Audio.se_play("Audio/SE/EGDSE_#{enemy_id}", 100, 100)
- end
- end
- end
- #==============================================================================
- # ■ Sprite_Battler
- #==============================================================================
- class Sprite_Battler < Sprite_Base
- #--------------------------------------------------------------------------
- # ● 初始化(追加定义)
- #--------------------------------------------------------------------------
- alias hzhj_old_init_for_dead_spr_battler initialize
- def initialize(viewport, battler = nil)
- hzhj_old_init_for_dead_spr_battler(viewport, battler)
- @dead_graphic_used = false
- if @battler
- @battler.set_normal_battler_name
- if @battler.dead?
- if (UseActorDeadGraphic && @battler.actor?) or
- (UseEnemyDeadGraphic && @battler.enemy?)
- @battler.set_dead_battler_name
- @dead_graphic_used = true
- end
- end
- end
- @beaten_duration = -1
- end
- #--------------------------------------------------------------------------
- # ● 设置战斗者(追加定义)
- #--------------------------------------------------------------------------
- alias hzhj_old_set_battler_for_dead_spr_battler battler=
- def battler=(value)
- if @battler != value
- @dead_graphic_used = false
- if value
- value.set_normal_battler_name
- if value.dead?
- if (UseActorDeadGraphic && value.actor?) or
- (UseEnemyDeadGraphic && value.enemy?)
- value.set_dead_battler_name
- @dead_graphic_used = true
- end
- end
- end
- @beaten_duration = -1
- end
- hzhj_old_set_battler_for_dead_spr_battler(value)
- end
- #--------------------------------------------------------------------------
- # ● 源位图(Source Bitmap)的更新(重定义)
- #--------------------------------------------------------------------------
- alias hzhj_old_update_bitmap_for_was_beaten_spr_battler update_bitmap
- def update_bitmap
- if @beaten_duration > 0
- @beaten_duration -= 1
- elsif @beaten_duration == 0
- @beaten_duration = -1
- set_bitmap(:normal)
- end
- hzhj_old_update_bitmap_for_was_beaten_spr_battler
- end
- #--------------------------------------------------------------------------
- # ● 初始化可视状态(追加定义)
- #--------------------------------------------------------------------------
- alias hzhj_old_visibility_for_dead_spr_battler init_visibility
- def init_visibility
- hzhj_old_visibility_for_dead_spr_battler
- if @battler.dead?
- if (UseActorDeadGraphic && @battler.actor?) or
- (UseEnemyDeadGraphic && @battler.enemy?)
- self.opacity = 255
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● 效果开始(追加定义)
- #--------------------------------------------------------------------------
- alias hzhj_old_start_effect_for_dead_spr_battler start_effect
- def start_effect(effect_type)
- if effect_type == :appear
- if @dead_graphic_used
- set_bitmap(:normal)
- @effect_type = nil
- @effect_duration = 0
- @dead_graphic_used = false
- @battler_visible = true
- return
- end
- elsif effect_type == :collapse or
- effect_type == :boss_collapse or
- effect_type == :instant_collapse
- if @beaten_duration >= 0
- @beaten_duration = -1
- set_bitmap(:normal)
- end
- if (UseActorDeadGraphic && @battler.actor?) or
- (UseEnemyDeadGraphic && @battler.enemy?)
- set_bitmap(:dead)
- @effect_type = nil
- @effect_duration = 0
- @dead_graphic_used = true
- @battler_visible = false
- return
- end
- end
- hzhj_old_start_effect_for_dead_spr_battler(effect_type)
- end
- #--------------------------------------------------------------------------
- # ● 设置新的位图(新增定义)
- #--------------------------------------------------------------------------
- def set_bitmap(sym)
- case sym
- when :normal
- @battler.set_normal_battler_name
- when :was_beaten
- @battler.set_beaten_battler_name
- when :dead
- @battler.set_dead_battler_name
- else
- return
- end
- new_bitmap = Cache.battler(@battler.battler_name, @battler.battler_hue)
- if bitmap != new_bitmap
- self.bitmap = new_bitmap
- @dynamic_duration = 0
- @sx = 0
- @sw = bitmap.width / DynamicPatternMax
- @sh = bitmap.height
- self.ox = @sw / 2
- self.oy = @sh
- src_rect.set(@sx, 0, @sw, @sh)
- end
- update_origin
- update_position
- end
- end
复制代码 本来是想照其他图的相应脚本的格式穿插的,不过好像不行,请问该情况如何解决? |
|