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

Project1

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

[已经解决] 对话自动匹配肖像图

[复制链接]

Lv2.观梦者 (暗夜天使)

梦石
0
星屑
266
在线时间
2355 小时
注册时间
2009-3-13
帖子
2309

贵宾

1
发表于 2013-1-22 23:20:19 | 显示全部楼层
本帖最后由 Sion 于 2013-1-22 23:45 编辑
  1. params[0] == "MAIN"
复制代码
就是新建一个图片命名为MAIN放到头像的文件夹里,要显示角色头像的时候选这个图片。这下明白了吧。报错的话,重写一下,把if.......end那段插到原方法wait_for_message之后。
回复 支持 反对

使用道具 举报

Lv2.观梦者 (暗夜天使)

梦石
0
星屑
266
在线时间
2355 小时
注册时间
2009-3-13
帖子
2309

贵宾

2
发表于 2013-1-23 12:23:33 | 显示全部楼层
这样改应该可以吧
  1.   def command_101
  2.       wait_for_message
  3.       if @params[0] == "MAIN"    #索引图片的名称
  4.         actor = $game_party.members[@params[1]]
  5.          face_name = actor.character_name
  6.          face_index = actor.character_index
  7.       else
  8.         face_name = @params[0]
  9.         face_index = @params[1]
  10.      end
  11.     $game_message.face_name = face_name
  12.     $game_message.face_index = face_index
  13.     $game_message.background = @params[2]
  14.     $game_message.position = @params[3]
  15.     while next_event_code == 401       # 文字数据
  16.       @index += 1
  17.       $game_message.add(@list[@index].parameters[0])
  18.     end
  19.     case next_event_code
  20.     when 102  # 显示选项
  21.       @index += 1
  22.       setup_choices(@list[@index].parameters)
  23.     when 103  # 数值输入的处理
  24.       @index += 1
  25.       setup_num_input(@list[@index].parameters)
  26.     when 104  # 物品选择的处理
  27.       @index += 1
  28.       setup_item_choice(@list[@index].parameters)
  29.     end
  30.     wait_for_message
  31.   end
复制代码
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-14 23:02

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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