Project1
标题:
怎么在菜单里显示人物头像和全身像啊?
[打印本页]
作者:
逍☆遥
时间:
2007-7-7 17:32
标题:
怎么在菜单里显示人物头像和全身像啊?
就是和新手录象里大富翁的那个菜单一样,看录象说好象是用了什么脚本,但是又没说是哪个.....谢谢! [LINE]1,#dddddd[/LINE]
本贴由论坛斑竹真·ZERO认可答案,如楼主认为问题未解决,请重新将此贴编辑为“有事请教”,并回帖叙述疑点即可~ ^-^
作者:
逍☆遥
时间:
2007-7-7 17:32
标题:
怎么在菜单里显示人物头像和全身像啊?
就是和新手录象里大富翁的那个菜单一样,看录象说好象是用了什么脚本,但是又没说是哪个.....谢谢! [LINE]1,#dddddd[/LINE]
本贴由论坛斑竹真·ZERO认可答案,如楼主认为问题未解决,请重新将此贴编辑为“有事请教”,并回帖叙述疑点即可~ ^-^
作者:
精灵使者
时间:
2007-7-7 18:11
应该是的吧。不过,头像是要有要求的哦……必须和战斗图_f作为文件名,半身像要用战斗图_h作为文件名,放在picture里面。这是我从那里面摘出来的脚本,应该没有冲突。
这个是头像的。
#==============================================================================
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
# 显示菜单画面和同伴状态的窗口。
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化目标
#--------------------------------------------------------------------------
def initialize
super(0, 0, 480, 480)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 108
y = i * 116
actor = $game_party.actors[i]
testname = actor.battler_name+"_f.png"
if FileTest.exist?("Graphics/battlers/#{testname}")
bitmap=Bitmap.new("Graphics/battlers/#{testname}")
src_rect = Rect.new(0, 0, 100, 100) #——可自己调整大小
self.contents.blt(0, y, bitmap, src_rect)
else
draw_actor_graphic(actor, x - 60, y + 80)
end
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 200, y)
draw_actor_level(actor, x, y + 32)
draw_actor_state(actor, x + 90, y + 32)
draw_actor_exp(actor, x, y + 64,180)
draw_actor_hp(actor, x + 200, y + 32)
draw_actor_sp(actor, x + 200, y + 64)
end
end
#--------------------------------------------------------------------------
# ● 刷新光标矩形
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
end
end
end
复制代码
状态里面的全身像应该是这个。
#==============================================================================
# ■ Window_Status
#------------------------------------------------------------------------------
# 显示状态画面、完全规格的状态窗口。
#==============================================================================
class Window_Status < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
# actor : 角色
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
testname = @actor.battler_name+"_h.png"
if FileTest.exist?("Graphics/battlers/#{testname}")
bitmap=Bitmap.new("Graphics/battlers/#{testname}")
src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) #——可自己调整大小
self.contents.blt(0, y, bitmap, src_rect)
draw_actor_name(@actor, 4, 0)
draw_actor_class(@actor, 4 + 144, 0)
draw_actor_level(@actor, 96, 32)
draw_actor_state(@actor, 96, 64)
draw_actor_hp(@actor, 96, 112, 172)
draw_actor_sp(@actor, 96, 144, 172)
draw_actor_parameter(@actor, 96, 192, 0)
draw_actor_parameter(@actor, 96, 224, 1)
draw_actor_parameter(@actor, 96, 256, 2)
draw_actor_parameter(@actor, 96, 304, 3)
draw_actor_parameter(@actor, 96, 336, 4)
draw_actor_parameter(@actor, 96, 368, 5)
draw_actor_parameter(@actor, 96, 400, 6)
self.contents.font.color = system_color
self.contents.draw_text(320, 48, 80, 32, "EXP")
self.contents.draw_text(320, 80, 80, 32, "NEXT")
self.contents.font.color = normal_color
self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)
self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(320, 160, 96, 32, "装备")
draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 208)
draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 256)
draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 304)
draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 352)
draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400)
end
end
def dummy
self.contents.font.color = system_color
self.contents.draw_text(320, 112, 96, 32, $data_system.words.weapon)
self.contents.draw_text(320, 176, 96, 32, $data_system.words.armor1)
self.contents.draw_text(320, 240, 96, 32, $data_system.words.armor2)
self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor3)
self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor4)
draw_item_name($data_weapons[@actor.weapon_id], 320 + 24, 144)
draw_item_name($data_armors[@actor.armor1_id], 320 + 24, 208)
draw_item_name($data_armors[@actor.armor2_id], 320 + 24, 272)
draw_item_name($data_armors[@actor.armor3_id], 320 + 24, 336)
draw_item_name($data_armors[@actor.armor4_id], 320 + 24, 400)
end
end
复制代码
[LINE]1,#dddddd[/LINE]
系统信息:本贴由版主真·ZERO认可为正确答案,66RPG感谢您的热情解答~
作者:
永劫的咎人
时间:
2007-7-7 18:17
提示:
作者被禁止或删除 内容自动屏蔽
作者:
精灵使者
时间:
2007-7-7 23:05
咎人说的是显示一张图片吧。我写的脚本是在菜单里显示所有人的头像,状态里显示所有人的全身像……
作者:
ky66RPG
时间:
2010-8-16 23:57
这个要插在那呀?我插MAIN里面,不行,错误!
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1