Project1
标题:
谁能把这个脚本整合一下并让它能显示头像
[打印本页]
作者:
luo8828959
时间:
2008-10-16 03:33
标题:
谁能把这个脚本整合一下并让它能显示头像
谁能把这个脚本整合一下
并让它的战斗能显示头像。求!
http://rpg.blue/upload_program/d ... ��斗_104527998.rar
[LINE]1,#dddddd[/LINE]
此贴于 2008-10-20 2:06:57 被版主天圣的马甲提醒,请楼主看到后对本贴做出回应。
[LINE]1,#dddddd[/LINE]
此贴于 2008-10-20 12:24:54 被版主darkten提醒,请楼主看到后对本贴做出回应。
[LINE]1,#dddddd[/LINE]
版务信息:版主帮忙结贴~
作者:
qcc001
时间:
2008-10-18 02:14
自己动手
事件设置 显示图片即可
作者:
luo8828959
时间:
2008-10-18 03:47
用事件?怎么弄啊?
作者:
421257166
时间:
2008-10-18 05:02
脚本是这个
http://rpg.blue/web/htm/news663.htm
具体的用法脚本里都写了,这个挺方便的
作者:
luo8828959
时间:
2008-10-18 23:25
谢谢,怪我没说清。我是说该怎么在那个战斗里加头像?就像《魔塔》那样。
作者:
redant
时间:
2008-10-19 00:59
#==============================================================================
# ■ 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 + "战斗.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
复制代码
("Graphics/System/Battle/sta_back/" + $game_party.actors[actor_index].name + "战斗.png")
就是 角色名字+战斗.PNG 放在Graphics/System/Battle/sta_back里
[LINE]1,#dddddd[/LINE]
系统信息:本贴由本区版主认可为正确答案,66RPG感谢您的热情解答~
作者:
luo8828959
时间:
2008-10-19 02:58
“角色名字+战斗.PNG”是不是就是,比如:
我的角色是 阿尔西斯 ,那么 角色名字+战斗.PNG 就是 阿尔西斯战斗.PNG?
作者:
魔人
时间:
2008-10-19 03:04
提示:
作者被禁止或删除 内容自动屏蔽
作者:
替天行乐
时间:
2008-10-19 04:47
提示:
作者被禁止或删除 内容自动屏蔽
作者:
luo8828959
时间:
2008-10-19 20:52
没有用,以前是什么样,现在还是什么样。
作者:
redant
时间:
2008-10-20 04:54
不会一点都不变吧
{/gg}
这就是你的问题了
新建一个试试
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1