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

Project1

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

怎么改战斗中显示的名字的颜色!

 关闭 [复制链接]
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-12-16
帖子
24
跳转到指定楼层
1
发表于 2007-12-18 02:38:08 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-12-16
帖子
24
2
 楼主| 发表于 2007-12-18 02:38:08 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
头像被屏蔽

Lv1.梦旅人 (禁止发言)

冰の红苹果的小狗狗

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-12-15
帖子
2539
3
发表于 2007-12-18 03:44:49 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
466 小时
注册时间
2006-2-25
帖子
1863
4
发表于 2007-12-18 03:51:18 | 只看该作者
  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 draw_actor_name_new(actor, x, y)
  33.     self.contents.font.color = text_color(2) # 括号内参数可修改(1-7)
  34.     self.contents.draw_text(x, y, 120, 32, actor.name)
  35.   end
  36.   #--------------------------------------------------------------------------
  37.   # ● 刷新
  38.   #--------------------------------------------------------------------------
  39.   def refresh
  40.     self.contents.clear
  41.     @item_max = $game_party.actors.size
  42.     for i in 0...$game_party.actors.size
  43.       actor = $game_party.actors[i]
  44.       actor_x = i * 160 + 4
  45.       draw_actor_name_new(actor, actor_x, 0)
  46.       draw_actor_hp(actor, actor_x, 32, 120)
  47.       draw_actor_sp(actor, actor_x, 64, 120)
  48.       if @level_up_flags[i]
  49.         self.contents.font.color = normal_color
  50.         self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
  51.       else
  52.         draw_actor_state(actor, actor_x, 96)
  53.       end
  54.     end
  55.   end
  56.   #--------------------------------------------------------------------------
  57.   # ● 刷新画面
  58.   #--------------------------------------------------------------------------
  59.   def update
  60.     super
  61.     # 主界面的不透明度下降
  62.     if $game_temp.battle_main_phase
  63.       self.contents_opacity -= 4 if self.contents_opacity > 191
  64.     else
  65.       self.contents_opacity += 4 if self.contents_opacity < 255
  66.     end
  67.   end
  68. end
复制代码


打开脚本编辑器.
找到Window_BattleStatus脚本
复制以上脚本
把Window_BattleStatus全部覆盖掉

脚本中第34行
self.contents.font.color = text_color(2) # 括号内参数可修改(1-7)
text_color(2)这个东西括号中的数字可以从1-7随便改.
代表不同颜色
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-2-7
帖子
95
5
发表于 2007-12-18 06:35:09 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2026-6-22 03:55

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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