Project1

标题: 向懂脚本的人提问.. [打印本页]

作者: 奶茶    时间: 2008-8-20 22:46
标题: 向懂脚本的人提问..
   我做的游戏是  1个主角 + 一个技能召唤兽参加战斗的!

但是战斗时显示是这样的:


名字都在傍边的! 太难看了!  如何把它搞到中间去??

[LINE]1,#dddddd[/LINE]版务信息:本贴由楼主自主结贴~
作者: 「旅」    时间: 2008-8-20 22:51
脚本Window_BattleStatus的第39行-draw_actor_name(actor, actor_x, 0)在actor_x后面加上
+N 或者 -N
作者: 殲滅天使·玲    时间: 2008-8-20 22:54
替换原来的Window_BattleStatus
  1. #==============================================================================
  2. # ■ Window_BattleStatus
  3. #------------------------------------------------------------------------------
  4. #  显示战斗画面同伴状态的窗口。
  5. #==============================================================================

  6. class Window_BattleStatus < Window_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化对像
  9.   #--------------------------------------------------------------------------
  10.   def initialize
  11.     super(0, 320, 640, 160)
  12.     self.contents = Bitmap.new(width - 32, height - 32)
  13.     @level_up_flags = [false, false, false, false]
  14.     refresh
  15.   end
  16.   #--------------------------------------------------------------------------
  17.   # ● 释放
  18.   #--------------------------------------------------------------------------
  19.   def dispose
  20.     super
  21.   end
  22.   #--------------------------------------------------------------------------
  23.   # ● 设置升级标志
  24.   #     actor_index : 角色索引
  25.   #--------------------------------------------------------------------------
  26.   def level_up(actor_index)
  27.     @level_up_flags[actor_index] = true
  28.   end
  29.   #--------------------------------------------------------------------------
  30.   # ● 刷新
  31.   #--------------------------------------------------------------------------
  32.   def refresh
  33.     self.contents.clear
  34.     @item_max = $game_party.actors.size
  35.     for i in 0...$game_party.actors.size
  36.       actor = $game_party.actors[i]
  37.       actor_x = i * 160 + 4
  38.       draw_actor_name(actor, actor_x + 20, 0)
  39.       draw_actor_hp(actor, actor_x, 32, 120)
  40.       draw_actor_sp(actor, actor_x, 64, 120)
  41.       if @level_up_flags[i]
  42.         self.contents.font.color = normal_color
  43.         self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
  44.       else
  45.         draw_actor_state(actor, actor_x + 20, 96)
  46.       end
  47.     end
  48.   end
  49.   #--------------------------------------------------------------------------
  50.   # ● 刷新画面
  51.   #--------------------------------------------------------------------------
  52.   def update
  53.     super
  54.     # 主界面的不透明度下降
  55.     if $game_temp.battle_main_phase
  56.       self.contents_opacity -= 4 if self.contents_opacity > 191
  57.     else
  58.       self.contents_opacity += 4 if self.contents_opacity < 255
  59.     end
  60.   end
  61. end
复制代码


此处只修改了
draw_actor_name(actor, actor_x + 20, 0)
draw_actor_state(actor, actor_x + 20, 96)
[LINE]1,#dddddd[/LINE]慢了 ,如果正确请认可 旅 ~ [LINE]1,#dddddd[/LINE]系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者: 「旅」    时间: 2008-8-20 22:59
以下引用殲滅天使·玲于2008-8-20 14:54:10的发言:

慢了 ,如果正确请认可 旅 ~

不用…我写得很不详细…请认可"玲"
作者: 奶茶    时间: 2008-8-21 00:11


            - -||   那我认可谁吖....
作者: 「旅」    时间: 2008-8-21 00:14
认可"玲"…不然……{/dy}
作者: 奶茶    时间: 2008-8-21 00:38


    - -||




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