赞 | 8 |
VIP | 0 |
好人卡 | 0 |
积分 | 29 |
经验 | 6755 |
最后登录 | 2024-11-12 |
在线时间 | 389 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 2949
- 在线时间
- 389 小时
- 注册时间
- 2010-12-4
- 帖子
- 141
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
因为不明原因直接导入图片血条后进入战斗后发生剧情对话会出现严重的顿卡,所以自己用脚本做了一个渐变颜色的血条。
可是问题又来了,如图我方血条扣血想要从右向左开始扣除的,但不知道为什么现在是从左往右开始扣除,研究了2天了,一直没有找到解决办法,求大神帮忙看看如何修改,敌人方是正常的。
下面是脚本,麻烦看下要修改哪里。
##==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
# ————————————————————————————————————
# ▼▲▼ XRXS_BP 2. HP,SPメーター表示 ▼▲▼
# by 桜雅 在土
#==============================================================================
# ■ Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# ● 初始化
#--------------------------------------------------------------------------
alias xrxs_bp2_refresh refresh
def refresh
xrxs_bp2_refresh
@item_max = $game_party.actors.size
#
for i in 0...$game_party.actors.size
actor = $game_party.actors
actor_x = 0
actor_y = i * 50 + 75
draw_actor_hp_meter(actor, actor_x, actor_y, 100)
end
end
end
#==============================================================================
# ■ Window_Base
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# ● HP描画
#--------------------------------------------------------------------------
def draw_actor_hp_meter(actor, x, y, width = 100, type = 0)
if type == 1 and actor.hp == 0
return
end
self.contents.font.color = system_color
self.contents.fill_rect(x-1, y+26, width,9, Color.new(0, 0, 0, 255))
w = width * (actor.maxhp - actor.hp) / [actor.maxhp,1].max
self.contents.fill_rect(x, y+26, 100,9, Color.new(0, 0, 0, 255))
self.contents.fill_rect(x, y+27, 100,7, Color.new(255, 255, 0, 255))
self.contents.fill_rect(x, y+27, 85,7, Color.new(255, 240, 0, 255))
self.contents.fill_rect(x, y+27, 80,7, Color.new(255, 225, 0, 255))
self.contents.fill_rect(x, y+27, 75,7, Color.new(255, 210, 0, 255))
self.contents.fill_rect(x, y+27, 70,7, Color.new(255, 195, 0, 255))
self.contents.fill_rect(x, y+27, 65,7, Color.new(255, 180, 0, 255))
self.contents.fill_rect(x, y+27, 60,7, Color.new(255, 165, 0, 255))
self.contents.fill_rect(x, y+27, 55,7, Color.new(255, 150, 0, 255))
self.contents.fill_rect(x, y+27, 50,7, Color.new(255, 135, 0, 255))
self.contents.fill_rect(x, y+27, 45,7, Color.new(255, 120, 0, 255))
self.contents.fill_rect(x, y+27, 40,7, Color.new(255, 105, 0, 255))
self.contents.fill_rect(x, y+27, 35,7, Color.new(255, 90, 0, 255))
self.contents.fill_rect(x, y+27, 30,7, Color.new(255, 75, 0, 255))
self.contents.fill_rect(x, y+27, 25,7, Color.new(255, 60, 0, 255))
self.contents.fill_rect(x, y+27, 20,7, Color.new(255, 45, 0, 255))
self.contents.fill_rect(x, y+27, 15,7, Color.new(255, 0, 0, 255))
self.contents.fill_rect(x, y+26, w,9, Color.new(0, 0, 0, 255))
# self.contents.fill_rect(x-2, y+26, width,9, Color.new(0, 0, 0, 255))
# w = width * actor.hp / [actor.maxhp,1].max
# bitmap = RPG::Cache.picture("hp1_bar")
# self.contents.blt(x-1,y+26,bitmap,Rect.new(0,0,w,9))
end
end
|
|