设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1703|回复: 2
打印 上一主题 下一主题

请问如何做在选择角色时显示头像??

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
60
在线时间
4 小时
注册时间
2008-10-4
帖子
19
跳转到指定楼层
1
发表于 2008-10-8 15:53:15 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x


就是类似这个图里的,在选择由哪个人物行动时显示头像
此贴于 2008-10-16 13:26:31 被版主八云紫提醒,请楼主看到后对本贴做出回应。
版务信息:版主帮忙结贴~
- -#...

Lv1.梦旅人

kissye的宠物<

梦石
0
星屑
61
在线时间
1563 小时
注册时间
2008-8-11
帖子
6174

贵宾

2
发表于 2008-10-8 16:00:45 | 只看该作者
楼主要在哪里显示图片?战斗中?普通的场景选择?


如果要在战斗中加入头像……搜索柳柳的贴子……他发过这个脚本……
回复 支持 反对

使用道具 举报

Lv1.梦旅人

穿越一季:朔

梦石
0
星屑
50
在线时间
333 小时
注册时间
2007-4-11
帖子
5369

贵宾

3
发表于 2008-10-9 06:16:55 | 只看该作者
  1. #==============================================================================
  2. # 显示头像的战斗信息框 by 沉影不器
  3. #------------------------------------------------------------------------------
  4. # 功能: 给战斗信息框添加头像显示
  5. #
  6. #       由于敌人没有头像,目前vx素材又少,用战斗图装凑合着显示
  7. #       超过96*96的战斗图,取战斗图顶部居中的96*96方框图像
  8. #==============================================================================
  9. #==============================================================================
  10. # ■ Scene_Battle
  11. #------------------------------------------------------------------------------
  12. #  处理战斗画面的类。
  13. #==============================================================================
  14. class Scene_Battle < Scene_Base
  15.   attr_reader   :active_battler
  16. end
  17. #==============================================================================
  18. # ■ Window_Base
  19. #------------------------------------------------------------------------------
  20. #  游戏中全部窗口的超级类。
  21. #==============================================================================
  22. class Window_Base < Window
  23.   #--------------------------------------------------------------------------
  24.   # ● 描绘敌人脸谱图像
  25.   #--------------------------------------------------------------------------
  26.   def draw_enemy_face(actor, x, y, size = 96)
  27.     draw_battler(actor.battler_name, actor.battler_hue, x, y, size)
  28.   end
  29.   #--------------------------------------------------------------------------
  30.   # ● 描绘战斗图
  31.   #--------------------------------------------------------------------------
  32.   def draw_battler(battler_name, battler_hue, x, y, size = 96)
  33.     @battler_name = battler_name
  34.     @battler_hue = battler_hue
  35.     bitmap = Cache.battler(@battler_name, @battler_hue).clone
  36.     rect = Rect.new(0, 0, 0, 0)
  37.     rect.x = [bitmap.width/2 - 48, 0].max
  38.     rect.width = size
  39.     rect.height = size
  40.     self.contents.blt(x, y, bitmap, rect)
  41.     bitmap.dispose
  42.   end
  43. end

  44. #==============================================================================
  45. # ■ Window_BattleMessage
  46. #------------------------------------------------------------------------------
  47. #  在战斗中显示消息的窗口。附加有普通消息窗口的功能、显示战斗进行中提示的
  48. # 的机能。
  49. #==============================================================================
  50. class Window_BattleMessage < Window_Message
  51.   #--------------------------------------------------------------------------
  52.   # ● 刷新
  53.   #--------------------------------------------------------------------------
  54.   def refresh
  55.     self.contents.clear
  56.     for i in [email protected]
  57.       draw_line(i)
  58.     end
  59.     return unless $scene.is_a?(Scene_Battle)
  60.     if $scene.active_battler != nil
  61.       battler = $scene.active_battler
  62.       if battler.is_a?(Game_Enemy)
  63.         draw_enemy_face($scene.active_battler, 0, 0, 96)
  64.       else
  65.         draw_actor_face($scene.active_battler, 0, 0, 96)
  66.       end
  67.     end
  68.   end
  69.   #--------------------------------------------------------------------------
  70.   # ● 描绘行
  71.   #     index : 行编号
  72.   #--------------------------------------------------------------------------
  73.   def draw_line(index)
  74.     rect = Rect.new(0, 0, 0, 0)
  75.     rect.x += 4 + 96
  76.     rect.y += index * WLH
  77.     rect.width = contents.width - 8
  78.     rect.height = WLH
  79.     self.contents.clear_rect(rect)
  80.     self.contents.font.color = normal_color
  81.     self.contents.draw_text(rect, @lines[index])
  82.   end
  83. end
复制代码


符合你所有要求
系统信息:本贴由本区版主认可为正确答案,66RPG感谢您的热情解答~
6R复活?别扯淡了.

柳柳一旦接手66RPG,我果断呵呵啊。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2025-7-22 18:27

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表