游系风 发表于 2012-12-22 14:25
不用战斗中换人,战前就换好了。
我想弄一个,除了主角外,其他同伴可以随便搭配的游戏(不同的角色,不 ...
修改脚本中def create_rtabcp_gauge
#-------------------------------------------------------------------------- # ● 生成战斗CP条 #-------------------------------------------------------------------------- def create_rtabcp_gauge @cpgauge_back = Sprite.new(@viewport3) @cpgauge_back.bitmap = Bitmap.new(200, 8) @cpgauge_back.bitmap.gradient_fill_rect(0, 0, 200, 16, Color.new(0, 255, 0), Color.new(255, 0, 0)) @cpgauge_back.x = 16 @cpgauge_back.y = 16 # 各个角色生成其图标 @icons = {} for iii in $game_party.members index=iii.id @icons[iii] = Sprite.new(@viewport3) @icons[iii].bitmap = Bitmap.new("Graphics/Pictures/Actor/"+index.to_s+".png") @icons[iii].ox = 12 @icons[iii].oy = 12 @icons[iii].x = 16 @icons[iii].y = 20 index+=1 end for iii in $game_troop.members index=iii.enemy_id @icons[iii] = Sprite.new(@viewport3) @icons[iii].bitmap = Bitmap.new("Graphics/Pictures/Troop/"+index.to_s+".png") @icons[iii].ox = 12 @icons[iii].oy = 12 @icons[iii].x = 16 @icons[iii].y = 20 index+=1 end end
#--------------------------------------------------------------------------
# ● 生成战斗CP条
#--------------------------------------------------------------------------
def create_rtabcp_gauge
@cpgauge_back = Sprite.new(@viewport3)
@cpgauge_back.bitmap = Bitmap.new(200, 8)
@cpgauge_back.bitmap.gradient_fill_rect(0, 0, 200, 16, Color.new(0, 255, 0), Color.new(255, 0, 0))
@cpgauge_back.x = 16
@cpgauge_back.y = 16
# 各个角色生成其图标
@icons = {}
for iii in $game_party.members
index=iii.id
@icons[iii] = Sprite.new(@viewport3)
@icons[iii].bitmap = Bitmap.new("Graphics/Pictures/Actor/"+index.to_s+".png")
@icons[iii].ox = 12
@icons[iii].oy = 12
@icons[iii].x = 16
@icons[iii].y = 20
index+=1
end
for iii in $game_troop.members
index=iii.enemy_id
@icons[iii] = Sprite.new(@viewport3)
@icons[iii].bitmap = Bitmap.new("Graphics/Pictures/Troop/"+index.to_s+".png")
@icons[iii].ox = 12
@icons[iii].oy = 12
@icons[iii].x = 16
@icons[iii].y = 20
index+=1
end
end
角色图标目录 /Graphics/Pictures/Actor/
如角色A的Id为1 那图标为 1.png
敌人图标目录 /Graphics/Pictures/Troop/
如敌人A的Id为1 那图标为 1.png
|