Project1

标题: 臉圖戰鬥,使用物品 [打印本页]

作者: ss4422ss    时间: 2015-5-12 18:28
标题: 臉圖戰鬥,使用物品
請問一下,我使用的臉圖戰鬥腳本,在使用物品時,右邊跳出的是人物的名字來做選擇,而不是人物圖片,像是原本預設的系統一樣


感謝!各位~

附上腳本
RUBY 代码复制
  1. #==============================================================================
  2. # ■ VXAce-RGSS3-10 フロントビュー改 [Ver.1.0.0]            by Claimh
  3. #------------------------------------------------------------------------------
  4. # ・戦闘画面を顔グラフィック表示に変更します。
  5. # ・エネミー選択ウィンドウで残HPを表示します。
  6. #==============================================================================
  7.  
  8.  
  9. #==============================================================================
  10. # ■ Window_BattleStatus
  11. #==============================================================================
  12. class Window_BattleStatus < Window_Selectable
  13.   #--------------------------------------------------------------------------
  14.   # ● HP/MP/TPの行の高さ取得
  15.   #--------------------------------------------------------------------------
  16.   def gauge_line_height
  17.     return 15
  18.   end
  19.   #--------------------------------------------------------------------------
  20.   # ● 桁数の取得
  21.   #--------------------------------------------------------------------------
  22.   def col_max
  23.     return [item_max, 5].max
  24.   end
  25.   #--------------------------------------------------------------------------
  26.   # ● 横に項目が並ぶときの空白の幅を取得
  27.   #--------------------------------------------------------------------------
  28.   def spacing
  29.     return 0
  30.   end
  31.   #--------------------------------------------------------------------------
  32.   # ● 項目を描画する矩形の取得
  33.   #--------------------------------------------------------------------------
  34.   def item_rect(index)
  35.     rect = Rect.new
  36.     rect.width = item_width
  37.     rect.height = contents_height
  38.     rect.x = index % col_max * (item_width + spacing)
  39.     rect.y = index / col_max * contents_height
  40.     rect
  41.   end
  42.   #--------------------------------------------------------------------------
  43.   # ● 基本エリアの矩形を取得
  44.   #--------------------------------------------------------------------------
  45.   def basic_area_rect(index)
  46.     rect = item_rect_for_text(index)
  47.     rect.height -= gauge_area_height
  48.     rect
  49.   end
  50.   #--------------------------------------------------------------------------
  51.   # ● ゲージエリアの矩形を取得
  52.   #--------------------------------------------------------------------------
  53.   def gauge_area_rect(index)
  54.     rect = item_rect_for_text(index)
  55.     rect.y += contents_height - gauge_area_height - 8
  56.     rect.height = gauge_area_height
  57.     rect
  58.   end
  59.   #--------------------------------------------------------------------------
  60.   # ● ゲージエリアの高さを取得
  61.   #--------------------------------------------------------------------------
  62.   def gauge_area_height
  63.     return (gauge_line_height * ($data_system.opt_display_tp ? 3 : 2))
  64.   end
  65.   #--------------------------------------------------------------------------
  66.   # ● 基本エリアの描画
  67.   #--------------------------------------------------------------------------
  68.   def draw_basic_area(rect, actor)
  69. #    draw_actor_name(actor, rect.x, rect.y, 100)
  70.     draw_actor_face(actor, rect.x, rect.y, !actor.dead?)
  71.     draw_actor_icons(actor, rect.x, rect.y, rect.width+8)
  72.   end
  73.   #--------------------------------------------------------------------------
  74.   # ● ゲージエリアの描画(TP あり)
  75.   #--------------------------------------------------------------------------
  76.   def draw_gauge_area_with_tp(rect, actor)
  77.     draw_actor_hp(actor, rect.x, rect.y + gauge_line_height * 0, rect.width)
  78.     draw_actor_mp(actor, rect.x, rect.y + gauge_line_height * 1, rect.width)
  79.     draw_actor_tp(actor, rect.x, rect.y + gauge_line_height * 2, rect.width)
  80.   end
  81.   #--------------------------------------------------------------------------
  82.   # ● ゲージエリアの描画(TP なし)
  83.   #--------------------------------------------------------------------------
  84.   def draw_gauge_area_without_tp(rect, actor)
  85.     draw_actor_hp(actor, rect.x, rect.y + gauge_line_height * 1, rect.width)
  86.     draw_actor_mp(actor, rect.x, rect.y + gauge_line_height * 2, rect.width)
  87.   end
  88. end
  89.  
  90.  
  91. #==============================================================================
  92. # ■ Window_BattleEnemy
  93. #==============================================================================
  94. class Window_BattleEnemy < Window_Selectable
  95.   #--------------------------------------------------------------------------
  96.   # ● 項目の描画
  97.   #--------------------------------------------------------------------------
  98.   alias draw_item_fv draw_item
  99.   def draw_item(index)
  100.     draw_hp(index)
  101.     draw_item_fv(index)
  102.   end
  103.   #--------------------------------------------------------------------------
  104.   # ● HPの描画
  105.   #--------------------------------------------------------------------------
  106.   def draw_hp(index)
  107.     rect = item_rect_for_text(index)
  108.     w = rect.width - 60
  109.     x = rect.x + 30
  110.     hp = $game_troop.alive_members[index].hp_rate
  111.     draw_gauge(x, rect.y, w, hp, hp_gauge_color1, hp_gauge_color2)
  112.   end
  113. end






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