Project1

标题: 改变头像脚本请教,到底是哪里不对… [打印本页]

作者: lottesong    时间: 2014-4-7 23:27
标题: 改变头像脚本请教,到底是哪里不对…
作者是Deathmock5。 大概是偶尔改变一次头像,以后所有的对话框里的头像都自动更换成这个的脚本, 挺省事的
头像图片定义为用Party、 Party1……到Party4这样命名
为毛Party.png的时候是好用的  然后Party1开始就 产生错误啊   Σ( ° △ °|||)︴不明觉厉 ……   找F1日文帮助脑仁疼


谢谢指教!

RUBY 代码复制
  1. #======================================================================
  2. #================Deathmock5's Actor face changer=======================
  3. #Makes text more dynamic by changeinf the face graphic to match the actor
  4. #for partmembers and player, change the face graphics to ones in party.png
  5. #then while in game they will change dynamicly.
  6. #place Party.png in the /faces/ folder
  7. #for partys larger then 8 place a Party1.png in the /faces/ folder.
  8. #if more is needed add 1. so Party2, Party3, ext.
  9. #next update: if charicter is missing, prevent crash
  10. #======================================================================
  11. class Window_Message < Window_Base
  12.   FINDER_NAME = 'Party'
  13.   def new_page(text, pos)
  14.         contents.clear
  15.         if ($game_message.face_name.include? 'Party')
  16.           $finder_set = $game_message.face_name[5..-1]
  17.           if ($finder_set != '')
  18.                 actor = $game_party.members[$game_message.face_index + $finder_set.to_i * 8]
  19.                 draw_face(actor.face_name, actor.face_index, 0, 0)
  20.           else
  21.                 actor = $game_party.members[$game_message.face_index]
  22.                 draw_face(actor.face_name, actor.face_index, 0, 0)
  23.           end
  24.         else
  25.                 draw_face($game_message.face_name, $game_message.face_index, 0, 0)
  26.         end
  27.         reset_font_settings
  28.         pos[:x] = new_line_x
  29.         pos[:y] = 0
  30.         pos[:new_x] = new_line_x
  31.         pos[:height] = calc_line_height(text)
  32.         clear_flags
  33.   end
  34. end





欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1