Project1
标题:
1vip求血槽绘制教学!
[打印本页]
作者:
索非亚
时间:
2008-9-22 21:04
提示:
作者被禁止或删除 内容自动屏蔽
作者:
浩气青天
时间:
2008-9-22 21:08
汗,我要是在家就绝对帮得到。试试多用几次迅雷和旋风下载。 [LINE]1,#dddddd[/LINE]
系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~
作者:
苏菲娅
时间:
2008-9-22 21:12
顺便谁帮我看看这个脚本,游戏里有4个人战斗,可是只有两个人有血槽...{/gg}
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
# ————————————————————————————————————
# ▼▲▼ XRXS_BP 7. バトルステータス?クリアデザイン ver.1.03 ▼▲▼
# by 桜雅 在土
#==============================================================================
# ■ Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_accessor :update_cp_only # CPメーターのみの更新
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
alias xrxs_bp7_initialize initialize
def initialize
# 初期化
@previous_hp = []
@previous_sp = []
# 呼び戻す
xrxs_bp7_initialize
# ↓Full-Viewの場合は下二行の # を消してください。
#self.opacity = 0
#self.back_opacity = 0
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
alias xrxs_bp7_refresh refresh
def refresh
# CPメーターの更新のみ の場合
if @update_cp_only
xrxs_bp7_refresh
return
end
# 変更するものがない場合、飛ばす
@item_max = $game_party.actors.size
bool = false
for i in 0...@item_max
actor = $game_party.actors[i]
if (@previous_hp[i] != actor.hp) or (@previous_sp[i] != actor.sp)
bool = true
end
end
return if bool == false
# 描写を開始
self.contents.clear
for i in 0...@item_max
actor = $game_party.actors[i]
actor_x = i * 160 + 12
# 歩行キャラグラフィックの描写
# HP/SPメーターの描写
draw_actor_hp_meter_line(actor, actor_x, 59, 96, 12)
draw_actor_sp_meter_line(actor, actor_x, 84, 96, 12)
x = i * 170
a = actor.id.to_s
bitmap=Bitmap.new("Graphics/pictures/#{a}")
src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.blt(x, 0, bitmap, src_rect)
# HP数値の描写
self.contents.font.size = 24 # HP/SP数値の文字の大きさ
self.contents.font.color = Color.new(0,0,0,192)
self.contents.draw_text(actor_x, 40, 96, 24, actor.hp.to_s, 2)
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
self.contents.draw_text(actor_x-2, 38, 96, 24, actor.hp.to_s, 2)
# SP数値の描写
self.contents.font.color = Color.new(0,0,0,192)
self.contents.draw_text(actor_x, 72, 96, 24, actor.sp.to_s, 2)
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
self.contents.draw_text(actor_x-2, 70, 96, 24, actor.sp.to_s, 2)
# 用語「HP」と用語「SP」の描写
self.contents.font.size = 18 # 用語「HP/SP」の文字の大きさ
self.contents.font.color = Color.new(0,0,0,192)
self.contents.draw_text(actor_x+2, 32, 196, 24, $data_system.words.hp)
self.contents.draw_text(actor_x+2, 64, 196, 24, $data_system.words.sp)
self.contents.font.color = system_color # 用語「HP/SP」の文字の色
self.contents.draw_text(actor_x, 30, 196, 24, $data_system.words.hp)
self.contents.draw_text(actor_x, 62, 196, 24, $data_system.words.sp)
# ステートの描写
draw_actor_state(actor, actor_x, 100)
# 値を更新
@previous_hp[i] = actor.hp
@previous_hp[i] = actor.hp
end
end
end
#==============================================================================
# ■ Window_Base
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# ● HPメーター の描画
#--------------------------------------------------------------------------
def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
w = width * actor.hp / [actor.maxhp,1].max
hp_color_1 = Color.new(255, 0, 0, 192)
hp_color_2 = Color.new(255, 255, 0, 192)
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
x -= 1
y += (height/4).floor
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
end
#--------------------------------------------------------------------------
# ● SPメーター の描画
#--------------------------------------------------------------------------
def draw_actor_sp_meter_line(actor, x, y, width = 156, height = 4)
w = width * actor.sp / [actor.maxsp,1].max
hp_color_1 = Color.new( 0, 0, 255, 192)
hp_color_2 = Color.new( 0, 255, 255, 192)
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
x -= 1
y += (height/4).floor
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
end
#--------------------------------------------------------------------------
# ● 名前の描画
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_name draw_actor_name
def draw_actor_name(actor, x, y)
xrxs_bp7_draw_actor_name(actor, x, y) if @draw_ban != true
end
#--------------------------------------------------------------------------
# ● ステートの描画
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_state draw_actor_state
def draw_actor_state(actor, x, y, width = 120)
xrxs_bp7_draw_actor_state(actor, x, y, width) if @draw_ban != true
end
#--------------------------------------------------------------------------
# ● HP の描画
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_hp draw_actor_hp
def draw_actor_hp(actor, x, y, width = 100)
xrxs_bp7_draw_actor_hp(actor, x, y, width) if @draw_ban != true
end
#--------------------------------------------------------------------------
# ● SP の描画
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_sp draw_actor_sp
def draw_actor_sp(actor, x, y, width = 144)
xrxs_bp7_draw_actor_sp(actor, x, y, width) if @draw_ban != true
end
end
#==============================================================================
# ■ Scene_Battle
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
alias xrxs_bp7_update update
def update
xrxs_bp7_update
# メッセージウィンドウ表示中の場合
if $game_temp.message_window_showing
@status_window.update_cp_only = true
else
@status_window.update_cp_only = false
end
end
end
#==============================================================================
# ◇ 外部ライブラリ
#==============================================================================
class Window_Base
#--------------------------------------------------------------------------
# ● ライン描画 軽量版 by 桜雅 在土
#--------------------------------------------------------------------------
def draw_lineght(start_x, start_y, end_x, end_y, start_color)
# 描写距離の計算。大きめに直角時の長さ。
distance = (start_x - end_x).abs + (start_y - end_y).abs
# 描写開始
for i in 1..distance
x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
self.contents.set_pixel(x, y, start_color)
end
end
#--------------------------------------------------------------------------
# ● ライン描画 by 桜雅 在土
#--------------------------------------------------------------------------
def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color)
# 描写距離の計算。大きめに直角時の長さ。
distance = (start_x - end_x).abs + (start_y - end_y).abs
# 描写開始
if end_color == start_color
for i in 1..distance
x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
if width == 1
self.contents.set_pixel(x, y, start_color)
else
self.contents.fill_rect(x, y, width, width, start_color)
end
end
else
for i in 1..distance
x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
r = start_color.red * (distance-i)/distance + end_color.red * i/distance
g = start_color.green * (distance-i)/distance + end_color.green * i/distance
b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance
a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance
if width == 1
self.contents.set_pixel(x, y, Color.new(r, g, b, a))
else
self.contents.fill_rect(x, y, width, width, Color.new(r, g, b, a))
end
end
end
end
end
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
复制代码
作者:
浩气青天
时间:
2008-9-22 21:15
看着好麻烦,况且也不是很会,看看里面有没有设置错误了? [LINE]1,#dddddd[/LINE]
系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~
作者:
redant
时间:
2008-9-22 21:20
#图片血槽显示Ver 1.0(清爽版)
# by逐月
#描画HP槽
def HP (actor,x,y)
@bitmap3 = Bitmap.new("Graphics/Pictures/底")
@src_rect3 = Rect.new(0,0,@bitmap3.width, @bitmap3.height)
self.contents.blt(x,y, @bitmap3, @src_rect3)
#HP显示
@bitmap3 = Bitmap.new("Graphics/Pictures/hp")
w3 = @bitmap3.width * actor.hp/actor.maxhp
@src_rect3 = Rect.new(0,0,w3, @bitmap3.height)
self.contents.blt(x+4,y+2, @bitmap3, @src_rect3)
end
#描画SP槽
def SP (actor,x,y)
@bitmap1 = Bitmap.new("Graphics/Pictures/底")
@src_rect1 = Rect.new(0,0,@bitmap1.width, @bitmap1.height)
self.contents.blt(x,y, @bitmap1, @src_rect1)
#SP显示
@bitmap1 = Bitmap.new("Graphics/Pictures/sp")
w1 = @bitmap1.width * actor.sp/actor.maxsp
@src_rect1 = Rect.new(0,0,w1, @bitmap1.height)
self.contents.blt(x+4,y+2, @bitmap1, @src_rect1)
end
#==============================================================================
# ■ 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]
case i
when 0
x = 145
y = 259
when 1
x = 145
y = 339
when 2
x = 145
y = 419
when 3
x = 145
y = 499
end
###########################一切自改##############################
HP(actor, x-10, y)
SP(actor, x-10, y + 18)
#######################################一切自改###############
end
end
end
复制代码
http://rpg.blue/upload_program/goods/1_102518339.rar
把图放进去
那个录像50M 大了点
这是清爽版血条 6r里下的 有删节 你先试试 [LINE]1,#dddddd[/LINE]
系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~
作者:
殲滅天使·玲
时间:
2008-9-22 21:31
索非亚姐啊..那视频 好象 70多M..ORZ..
但 迅雷是能接上..只是速度orz...
值槽绘制的话..
def HP(actor, actor_x, w = 96)
self.contents.fill_rect(x-2, y+16, w+4, 8, Color.new(255,255,255,255)) #底色白底
self.contents.fill_rect(x-1, y+17, w+2, 6, Color.new(0,0,0,255)) #底色黑底
w1 = w * actor.hp/actor.maxhp # 计算血条宽 W1宽度是血条的w * 角色当前HP 除掉 角色最大HP
#下面是描绘血条, 为了立体感所以他描绘了几次
self.contents.fill_rect(x, y+18, w1, 1, Color.new(150,0,0,255))
self.contents.fill_rect(x, y+19, w1, 1, Color.new(255,0,0,255))
self.contents.fill_rect(x, y+20, w1, 1, Color.new(150,0,0,255))
end
上述是 用脚本来描绘...
图片的话, 比较简单...也会比较华丽
def SP(actor,x,y)
@bitmap1 = Bitmap.new("Graphics/Pictures/底槽图片")
@src_rect1 = Rect.new(0,0,@bitmap1.width,@bitmap1.height)
self.contents.blt(x,y,@bitmap1,@src_rect1)
@bitmap2 = Bitmap.new("Graphics/Pictures/蓝的图片")
w2 = @bitmap2.width * actor.sp/actor.maxsp
@src_rect2 = Rect.new(0,0, w2, @bitmap1.height)
self.contents.blt(x+1,y+1,@bitmap2,@src_rect2)
end
以上是视频的内容.....
把这些给覆盖 BASE里的 HP , SP的所有内容 就行了吧..
[LINE]1,#dddddd[/LINE]
系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~
作者:
索非亚
时间:
2008-9-22 21:32
提示:
作者被禁止或删除 内容自动屏蔽
作者:
索非亚
时间:
2008-9-22 21:47
提示:
作者被禁止或删除 内容自动屏蔽
作者:
seles
时间:
2008-9-22 21:52
提示:
作者被禁止或删除 内容自动屏蔽
作者:
redant
时间:
2008-9-22 21:55
#==============================================================================
# ■ Window_BattleStatus
#------------------------------------------------------------------------------
# 显示战斗画面同伴状态的窗口。
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@level_up_flags = [false, false, false, false]
#........................................................................
self.opacity = 0
@sta_back = []
@sta_output = []
# @cp_output = []
# @hp_bitmap = RPG::Cache.picture("../system/battle/hmcp/hp_bar.png")
#@mp_bitmap = RPG::Cache.picture("../system/battle/hmcp/mp_bar.png")
# @bitmap3 = RPG::Cache.picture("../system/battle/hmcp/底.png")
# @cp_bitmap = RPG::Cache.picture("../system/battle/hmcp/cp_bar.png")
# @cp_output = []
# @cp_back_bar = Sprite.new
#@cp_back_bar.bitmap = Bitmap.new("Graphics/system/battle/hmcp/cp_back_bar")
## @cp_back_bar.x = 450
# @cp_back_bar.y = 25
#@cp_back_bar.z = self.z + 1
# @actor_cp_sprite = []
# @actor_cp_sprite_back = []
for actor_index in 1..$game_party.actors.size
# @cp_output[actor_index] = Sprite.new
# @cp_output[actor_index].bitmap = Bitmap.new(133, 78)
# @cp_output[actor_index].x = 100 + (actor_index - 1) * 133
# @cp_output[actor_index].y = 480 - 78 - 10
# @cp_output[actor_index].z = self.z + 2
# @cp_output[actor_index].bitmap.clear
@sta_back[actor_index] = Sprite.new
@sta_back[actor_index].bitmap = Bitmap.new("Graphics/System/Battle/sta_back/" + $game_party.actors[actor_index - 1].name + "战斗.png")
@sta_back[actor_index].x = 10
@sta_back[actor_index].y = 220 + (actor_index - 1) * 80
@sta_back[actor_index].z = self.z + 1
@sta_output[actor_index] = Sprite.new
@sta_output[actor_index].bitmap = Bitmap.new(133, 78)
@sta_output[actor_index].x = 75
@sta_output[actor_index].y = 232 + (actor_index - 1) * 80
@sta_output[actor_index].z = self.z + 2
@sta_output[actor_index].bitmap.clear
@sta_output[actor_index].bitmap.font.size = 10
@sta_output[actor_index].bitmap.font.name = "黑体"
# hp_width = $game_party.actors[actor_index - 1].hp * @hp_bitmap.width/$game_party.actors[actor_index - 1].maxhp
# hp_rect = Rect.new(0, 0, hp_width, 5)
# mp_width = $game_party.actors[actor_index - 1].sp * @mp_bitmap.width/$game_party.actors[actor_index - 1].maxsp
# mp_rect = Rect.new(0, 0, mp_width, 5)
# @src_rect3 = Rect.new(0,0,@bitmap3.width, @bitmap3.height)
# self.contents.blt(10,220, @bitmap3, @src_rect3)
# @sta_output[actor_index].bitmap.blt(66, 44, @hp_bitmap, hp_rect)
# @sta_output[actor_index].bitmap.blt(66, 64, @mp_bitmap, mp_rect)
# @sta_output[actor_index].bitmap.blt(66, 54, @bitmap3, @src_rect3)
@sta_output[actor_index].bitmap.font.color.set(255, 0, 0)
@sta_output[actor_index].bitmap.draw_text(80, 31, 77, 11,$game_party.actors[actor_index - 1].hp.to_s + "/" + $game_party.actors[actor_index - 1].maxhp.to_s)
@sta_output[actor_index].bitmap.font.color.set(0, 0, 255)
@sta_output[actor_index].bitmap.draw_text(80, 51, 77, 11,$game_party.actors[actor_index - 1].sp.to_s + "/" + $game_party.actors[actor_index - 1].maxsp.to_s)
end
#........................................................................
refresh
end
#--------------------------------------------------------------------------
# ● 释放
#--------------------------------------------------------------------------
def dispose
super
# @hp_bitmap.bitmap.dispose
# @hp_bitmap.dispose
# @mp_bitmap.bitmap.dispose
# @mp_bitmap.dispose
#@cp_bitmap.bitmap.dispose
# @cp_bitmap.dispose
for actor_index in 1..$game_party.actors.size
@sta_back[actor_index].bitmap.dispose
@sta_back[actor_index].dispose
@sta_output[actor_index].bitmap.dispose
@sta_output[actor_index].dispose
# @cp_output[actor_index].bitmap.dispose
# @cp_output[actor_index].dispose
end
end
#--------------------------------------------------------------------------
# ● 设置升级标志
# actor_index : 角色索引
#--------------------------------------------------------------------------
def level_up(actor_index)
@level_up_flags[actor_index] = true
end
#......................................................................
#--------------------------------------------------------------------------
# ● 设置正在攻击标志
# actor_index : 角色索引
#--------------------------------------------------------------------------
def in_atk(actor_index)
@sta_back[actor_index + 1].bitmap = Bitmap.new("Graphics/System/Battle/sta_back/" + $game_party.actors[actor_index].name + "战斗1.png")
end
#--------------------------------------------------------------------------
# ● 设置不在攻击标志
# actor_index : 角色索引
#--------------------------------------------------------------------------
def out_atk(actor_index)
@sta_back[actor_index + 1].bitmap = Bitmap.new("Graphics/System/Battle/sta_back/" + $game_party.actors[actor_index].name + "战斗.png")
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 + 145
actor_y = i * 80 + 220
@sta_output[i + 1].bitmap.clear
# hp_width = $game_party.actors[i].hp * @hp_bitmap.width/$game_party.actors[i].maxhp
# hp_rect = Rect.new(0, 0, hp_width, 5)
# mp_width = $game_party.actors[i].sp * @mp_bitmap.width/$game_party.actors[i].maxsp
# mp_rect = Rect.new(0, 0, mp_width, 5)
# @sta_output[i + 1].bitmap.blt(66, 44, @hp_bitmap, hp_rect)
# @sta_output[i + 1].bitmap.blt(66, 64, @mp_bitmap, mp_rect)
@sta_output[i + 1].bitmap.font.color.set(255, 0, 0)
@sta_output[i + 1].bitmap.draw_text(80, 31, 77, 11,$game_party.actors[i].hp.to_s + "/" + $game_party.actors[i].maxhp.to_s)
@sta_output[i + 1].bitmap.font.color.set(0, 0, 255)
@sta_output[i + 1].bitmap.draw_text(80, 51, 77, 11,$game_party.actors[i].sp.to_s + "/" + $game_party.actors[i].maxsp.to_s)
#......................................................................
if @level_up_flags[i]
self.contents.font.color = normal_color
self.contents.draw_text(0, 0, 640 , 480, "LEVEL UP!")
else
draw_actor_state(actor, 120, actor_y)
end
end
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
super
# 主界面的不透明度下降
if $game_temp.battle_main_phase
self.contents_opacity = 255 #if self.contents_opacity > 1
else
self.contents_opacity = 255 #if self.contents_opacity < 255
end
end
end
复制代码
#掉了hp sp 部分
你再改回来吧 (能看出来吧{/gg})
再弄主角名字+战斗 和战斗1 的 两张图
放在Graphics\System\Battle\sta_back 里
system/battle/hmcp里弄上/hp_bar.png 的图片 等
[LINE]1,#dddddd[/LINE]
系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~
[LINE]1,#dddddd[/LINE]
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者:
seles
时间:
2008-9-22 21:59
提示:
作者被禁止或删除 内容自动屏蔽
作者:
索非亚
时间:
2008-9-22 22:22
提示:
作者被禁止或删除 内容自动屏蔽
作者:
redant
时间:
2008-9-22 22:40
#==============================================================================
# ■ Window_BattleStatus
#------------------------------------------------------------------------------
# 显示战斗画面同伴状态的窗口。
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(0, 320, 640, 480) #changed
self.opacity =0 # 透明度更改
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
actor = $game_party.actors[i]
case i
when 0
testname = actor.id.to_s+"-4"#1号角色头像
bitmap=Bitmap.new("Graphics/Pictures/#{testname}")
src_rect = Rect.new(0 ,0 , bitmap.width, bitmap.height)#——可自己调整大小
self.contents.blt(0,0, bitmap, src_rect)
draw_actor_name(actor, actor_x, 0)
draw_actor_hp(actor, actor_x, 32, 120)
draw_actor_sp(actor, actor_x, 64, 120)
draw_actor_state(actor, actor_x, 95)
when 1
testname = actor.id.to_s+"-4"#2号角色头像
bitmap=Bitmap.new("Graphics/Pictures/#{testname}")
src_rect = Rect.new(0 ,0 , bitmap.width, bitmap.height) #——可自己调整大小
self.contents.blt(100, 0, bitmap, src_rect)
draw_actor_name(actor, actor_x, 0)
draw_actor_hp(actor, actor_x, 32, 120)
draw_actor_sp(actor, actor_x, 64, 120)
draw_actor_state(actor, actor_x, 95)
when 2
testname = actor.id.to_s+"-4"#1号角色头像
bitmap=Bitmap.new("Graphics/Pictures/#{testname}")
src_rect = Rect.new(0 ,0 , bitmap.width, bitmap.height)#——可自己调整大小
self.contents.blt(200,0, bitmap, src_rect)
draw_actor_name(actor, actor_x, 0)
draw_actor_hp(actor, actor_x, 32, 120)
draw_actor_sp(actor, actor_x, 64, 120)
draw_actor_state(actor, actor_x, 95)
end
end
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
super
# 主界面的不透明度下降
if $game_temp.battle_main_phase
self.contents_opacity -= 4 if self.contents_opacity > 191
else
self.contents_opacity += 4 if self.contents_opacity < 255
end
end
end
复制代码
应该是这样吧{/hx}
[LINE]1,#dddddd[/LINE]
另外不是when3 和when4
是when2 和when3
这个其实错在 def initialize
super(0, 320, 640, 480) #changed
填上了有 但是窗口小 看不到而已 {/gg}
我只填上了when2 就是说3个人了 图上看得见
4个人同理把 when2 复制 坐标稍改
[LINE]1,#dddddd[/LINE]
系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~
作者:
索非亚
时间:
2008-9-22 22:43
提示:
作者被禁止或删除 内容自动屏蔽
作者:
redant
时间:
2008-9-22 22:48
#==============================================================================
# ■ Window_BattleStatus
#------------------------------------------------------------------------------
# 显示战斗画面同伴状态的窗口。
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(0, 320, 640, 480) #changed
self.opacity =0 # 透明度更改
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
actor = $game_party.actors[i]
case i
when 0
testname = actor.id.to_s+"-4"#1号角色头像
bitmap=Bitmap.new("Graphics/Pictures/#{testname}")
src_rect = Rect.new(0 ,0 , bitmap.width, bitmap.height)#——可自己调整大小
self.contents.blt(0,0, bitmap, src_rect)
draw_actor_name(actor, actor_x, 0)
draw_actor_hp(actor, actor_x, 32, 120)
draw_actor_sp(actor, actor_x, 64, 120)
draw_actor_state(actor, actor_x, 95)
when 1
testname = actor.id.to_s+"-4"#2号角色头像
bitmap=Bitmap.new("Graphics/Pictures/#{testname}")
src_rect = Rect.new(0 ,0 , bitmap.width, bitmap.height) #——可自己调整大小
self.contents.blt(100, 0, bitmap, src_rect)
draw_actor_name(actor, actor_x, 0)
draw_actor_hp(actor, actor_x, 32, 120)
draw_actor_sp(actor, actor_x, 64, 120)
draw_actor_state(actor, actor_x, 95)
when 2
testname = actor.id.to_s+"-4"#1号角色头像
bitmap=Bitmap.new("Graphics/Pictures/#{testname}")
src_rect = Rect.new(0 ,0 , bitmap.width, bitmap.height)#——可自己调整大小
self.contents.blt(200,0, bitmap, src_rect)
draw_actor_name(actor, actor_x, 0)
draw_actor_hp(actor, actor_x, 32, 120)
draw_actor_sp(actor, actor_x, 64, 120)
draw_actor_state(actor, actor_x, 95)
when 3
testname = actor.id.to_s+"-4"#1号角色头像
bitmap=Bitmap.new("Graphics/Pictures/#{testname}")
src_rect = Rect.new(0 ,0 , bitmap.width, bitmap.height)#——可自己调整大小
self.contents.blt(300,0, bitmap, src_rect)
draw_actor_name(actor, actor_x, 0)
draw_actor_hp(actor, actor_x, 32, 120)
draw_actor_sp(actor, actor_x, 64, 120)
draw_actor_state(actor, actor_x, 95)
end
end
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
super
# 主界面的不透明度下降
if $game_temp.battle_main_phase
self.contents_opacity -= 4 if self.contents_opacity > 191
else
self.contents_opacity += 4 if self.contents_opacity < 255
end
end
end
复制代码
囧全了
既然如此 你是发过 素材的索菲亚吧
那我只要这200分好了 V 你留着吧{/wx}
[LINE]1,#dddddd[/LINE]
[LINE]1,#dddddd[/LINE]
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者:
索非亚
时间:
2008-9-22 22:54
提示:
作者被禁止或删除 内容自动屏蔽
作者:
redant
时间:
2008-9-22 22:58
你那个素材 如果早点出的话 我就用你的了
被迫改别的素材 现在懒得改回来……
非常感谢你的素材共享 尽管我没用到 囧
作者:
索非亚
时间:
2008-9-22 23:01
提示:
作者被禁止或删除 内容自动屏蔽
作者:
redant
时间:
2008-9-22 23:03
大话 8方向的
已经认可
并且还两个 10分1个 190分1个{/fd}
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1