Project1
标题:
用了战斗血条简洁版脚本 为什么血条中间一条吧人物给遮住了 求修改
[打印本页]
作者:
只为歌笑
时间:
2012-7-28 08:58
标题:
用了战斗血条简洁版脚本 为什么血条中间一条吧人物给遮住了 求修改
大家帮帮我 用了战斗血条简洁版脚本 为什么血条中间一条吧人物给遮住了 求修改 就是把血条透明的显示在人物下方不要遮住人物
dsu_plus_rewardpost_czw
作者:
只为歌笑
时间:
2012-7-28 09:01
本帖最后由 hcm 于 2012-8-14 08:53 编辑
#========================================================================
# 本脚本来自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[i]
actor_x = i * 160 + 4
draw_actor_hp_meter(actor, actor_x, 32, 120)
draw_actor_sp_meter(actor, actor_x, 64, 120)
end
end
end
#========================================================================
# ■ Window_Base
#========================================================================
class Window_Base < Window
#-----------------------------------------------------------------------
# ● HP描画
#-----------------------------------------------------------------------
def draw_actor_hp_meter(actor, x, y, width = 156, type = 0)
if type == 1 and actor.hp == 0
return
end
self.contents.font.color = system_color
self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
w = width * actor.hp / [actor.maxhp,1].max
self.contents.fill_rect(x, y+28, w,1, Color.new(255, 96, 96, 255))
self.contents.fill_rect(x, y+29, w,1, Color.new(255, 0, 0, 255))
self.contents.fill_rect(x, y+30, w,1, Color.new(128, 0, 0, 255))
self.contents.fill_rect(x, y+31, w,1, Color.new(0, 0, 0, 255))
end
#-----------------------------------------------------------------------
# ● SP描画
#-----------------------------------------------------------------------
def draw_actor_sp_meter(actor, x, y, width = 156, type = 0)
if type == 1 and actor.hp == 0
return
end
self.contents.font.color = system_color
self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
w = width * actor.sp / [actor.maxsp,1].max
self.contents.fill_rect(x, y+28, w,1, Color.new(128, 255, 255, 255))
self.contents.fill_rect(x, y+29, w,1, Color.new(0, 255, 255, 255))
self.contents.fill_rect(x, y+30, w,1, Color.new(0, 192, 192, 255))
self.contents.fill_rect(x, y+31, w,1, Color.new(0, 128, 128, 255))
end
end
#========================================================================
# 本脚本来自www. 66RPG .com,使用和转载请保留此信息
#========================================================================
复制代码
作者:
只为歌笑
时间:
2012-7-28 09:03
以上脚本求人修改为血条稍透明显示在人物内不要遮住人物
作者:
爆焰
时间:
2012-7-29 23:57
#========================================================================
# ■ Window_Base
#========================================================================
class Window_Base < Window
#-----------------------------------------------------------------------
# ● HP描画
#-----------------------------------------------------------------------
def draw_actor_hp_meter(actor, x, y, width = 156, type = 0)
if type == 1 and actor.hp == 0
return
end
self.contents.font.color = system_color
self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
w = width * actor.hp / [actor.maxhp,1].max
self.contents.fill_rect(x, y+28, w,1, Color.new(255, 96, 96, 255))
self.contents.fill_rect(x, y+29, w,1, Color.new(255, 0, 0, 255))
self.contents.fill_rect(x, y+30, w,1, Color.new(128, 0, 0, 255))
self.contents.fill_rect(x, y+31, w,1, Color.new(0, 0, 0, 255))
end
#-----------------------------------------------------------------------
# ● SP描画
#-----------------------------------------------------------------------
def draw_actor_sp_meter(actor, x, y, width = 156, type = 0)
if type == 1 and actor.hp == 0
return
end
self.contents.font.color = system_color
self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
w = width * actor.sp / [actor.maxsp,1].max
self.contents.fill_rect(x, y+28, w,1, Color.new(128, 255, 255, 255))
self.contents.fill_rect(x, y+29, w,1, Color.new(0, 255, 255, 255))
self.contents.fill_rect(x, y+30, w,1, Color.new(0, 192, 192, 255))
self.contents.fill_rect(x, y+31, w,1, Color.new(0, 128, 128, 255))
end
end
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(0, 320, 640, 160)
self.contents = Bitmap.new(width - 32, height - 32)
@level_up_flags = [false, false, false, false]
refresh
end
#--------------------------------------------------------------------------
# ● 释放
#--------------------------------------------------------------------------
def dispose
super
end
#--------------------------------------------------------------------------
# ● 设置升级标志
# actor_index : 角色索引
#--------------------------------------------------------------------------
def level_up(actor_index)
@level_up_flags[actor_index] = true
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_x = i * 160 + 4
draw_actor_name(actor, actor_x, 0)
draw_actor_hp_meter(actor, actor_x, 48, 120)
draw_actor_sp_meter(actor, actor_x, 64, 120)
draw_actor_hp(actor, actor_x, 55, 120)
draw_actor_sp(actor, actor_x, 71, 120)
if @level_up_flags[i]
self.contents.font.color = normal_color
self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
else
draw_actor_state(actor, actor_x, 96)
end
end
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1