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

Project1

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

[已经解决] 关于角色显示hp,mp,tp问题?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
80
在线时间
132 小时
注册时间
2014-5-7
帖子
148
1
发表于 2015-11-24 06:04:43 | 显示全部楼层
抵制滥用备注
MP上限是0的角色只显示TP,否则只显示MP(没测,可能有忽略没改的地方
  1. class Window_Base < Window
  2.   def draw_actor_simple_status(actor, x, y)
  3.     draw_actor_name(actor, x, y)
  4.     draw_actor_level(actor, x, y + line_height * 1)
  5.     draw_actor_icons(actor, x, y + line_height * 2)
  6.     draw_actor_class(actor, x + 120, y)
  7.     draw_actor_hp(actor, x + 120, y + line_height * 1)
  8.     if actor.mmp > 0
  9.       draw_actor_mp(actor, x + 120, y + line_height * 2)
  10.     else; draw_actor_tp(actor, x + 120, y + line_height * 2); end
  11.   end
  12. end

  13. class Window_Status < Window_Selectable
  14.   def draw_basic_info(x, y)
  15.     draw_actor_level(@actor, x, y + line_height * 0)
  16.     draw_actor_icons(@actor, x, y + line_height * 1)
  17.     draw_actor_hp(@actor, x, y + line_height * 2)
  18.     if actor.mmp > 0
  19.       draw_actor_mp(@actor, x, y + line_height * 3)
  20.     else; draw_actor_tp(@actor, x, y + line_height * 3) end
  21.   end
  22. end

  23. class Window_BattleStatus < Window_Selectable
  24.   def draw_gauge_area(rect, actor)
  25.     if actor.mmp > 0
  26.       draw_gauge_area_without_tp(rect, actor)
  27.     else; draw_gauge_area_with_tp(rect, actor) end end
  28.       
  29.   def draw_gauge_area_with_tp(rect, actor)
  30.     draw_actor_hp(actor, rect.x + 0, rect.y, 72)
  31.     draw_actor_tp(actor, rect.x + 144,  rect.y, 76)
  32.   end
  33. end
复制代码

点评

还有个问题,在菜单界面是显示了TP,但是在战斗的时候还是显示的MP?  发表于 2015-11-24 21:11
可以用,但是因为之前加了菜单调整脚本,用了你这个脚本后,菜单调整过的位置都重置了,要重新设定。  发表于 2015-11-24 20:58
「私が来た!  私が見た!  ならば次わ買つだけのこと!」
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-10 17:30

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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