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

Project1

 找回密码
 注册会员
搜索
查看: 2257|回复: 6

[已经解决] 怎么样在战斗中不显示敌人血条

[复制链接]

Lv1.梦旅人

梦石
0
星屑
47
在线时间
253 小时
注册时间
2012-8-2
帖子
248
发表于 2012-9-13 12:57:25 | 显示全部楼层 |阅读模式
  {:2_286:}     

Lv1.梦旅人

梦石
0
星屑
50
在线时间
251 小时
注册时间
2009-11-13
帖子
453
发表于 2012-9-13 15:45:47 | 显示全部楼层
敌人本来就没有啊,如果用的是血条脚本,那你要把脚本贴出来啊。
回复

使用道具 举报

Lv3.寻梦者

双子人

梦石
0
星屑
3165
在线时间
3616 小时
注册时间
2009-4-4
帖子
4154

开拓者

发表于 2012-9-13 18:03:55 | 显示全部楼层
zxcgood2009 发表于 2012-9-13 15:45
敌人本来就没有啊,如果用的是血条脚本,那你要把脚本贴出来啊。
  1. # ————————————————————————————————————
  2. # 本脚本来自www.66rpg.com,转载请保留此信息
  3. # ————————————————————————————————————

  4. #==============================================================================
  5. # ■ Window_Help
  6. #------------------------------------------------------------------------------
  7. # 重新定义的内容,可以显示敌人的HP\MP百分比
  8. # 作者:carol3_柳柳
  9. #==============================================================================

  10. class Window_Help < Window_Base
  11.   def set_enemy(actor)
  12.     self.contents.clear
  13.     draw_actor_name(actor, 4, 0)
  14.     draw_actor_state(actor, 140, 0)
  15.     carol3_draw_hp_bar(actor, 284, 0)
  16.     carol3_draw_sp_bar(actor, 460, 0)
  17.     @text = nil
  18.     self.visible = true
  19.   end
  20.   def carol3_draw_hp_bar(actor, x, y, width = 128) #宽度可调
  21.     self.contents.font.color = system_color
  22.     self.contents.fill_rect(x-1, y+17, width+2,6, Color.new(0, 0, 0, 255))
  23.     w = width * actor.hp / actor.maxhp
  24.     self.contents.fill_rect(x, y+18, w,1, Color.new(255, 96, 96, 255))
  25.     self.contents.fill_rect(x, y+19, w,1, Color.new(255, 0, 0, 255))
  26.     self.contents.fill_rect(x, y+20, w,1, Color.new(128, 0, 0, 255))
  27.     self.contents.fill_rect(x, y+21, w,1, Color.new(0, 0, 0, 255))
  28.     self.contents.draw_text(x,y,128,32,$data_system.words.hp,1)
  29.     self.contents.font.color = normal_color
  30.   end
  31.   def carol3_draw_sp_bar(actor, x, y, width = 128)
  32.     self.contents.font.color = system_color
  33.     self.contents.fill_rect(x-1, y+17, width+2,6, Color.new(0, 0, 0, 255))
  34.     w = width * actor.sp / actor.maxsp
  35.     self.contents.fill_rect(x, y+18, w,1, Color.new(128, 255, 255, 255))
  36.     self.contents.fill_rect(x, y+19, w,1, Color.new(0, 255, 255, 255))
  37.     self.contents.fill_rect(x, y+20, w,1, Color.new(0, 192, 192, 255))
  38.     self.contents.fill_rect(x, y+21, w,1, Color.new(0, 128, 128, 255))
  39.     self.contents.draw_text(x,y,128,32,$data_system.words.sp,1)
  40.     self.contents.font.color = normal_color
  41.   end
  42. end
复制代码
怎么不可以敌人血条?
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
47
在线时间
253 小时
注册时间
2012-8-2
帖子
248
 楼主| 发表于 2012-9-13 19:07:01 | 显示全部楼层
hys111111 发表于 2012-9-13 18:03
怎么不可以敌人血条?

怎么样用呢?
回复

使用道具 举报

Lv3.寻梦者

双子人

梦石
0
星屑
3165
在线时间
3616 小时
注册时间
2009-4-4
帖子
4154

开拓者

发表于 2012-9-13 19:10:43 | 显示全部楼层
tallboy8 发表于 2012-9-13 19:07
怎么样用呢?

点击脚本编辑器,在Main前面按Insert插入就可以了。
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
47
在线时间
253 小时
注册时间
2012-8-2
帖子
248
 楼主| 发表于 2012-9-13 19:38:05 | 显示全部楼层
我是说。怎么样让我想要的一个敌人不显示血条
回复

使用道具 举报

Lv3.寻梦者

双子人

梦石
0
星屑
3165
在线时间
3616 小时
注册时间
2009-4-4
帖子
4154

开拓者

发表于 2012-9-13 21:25:02 | 显示全部楼层
tallboy8 发表于 2012-9-13 19:38
我是说。怎么样让我想要的一个敌人不显示血条
  1. # ————————————————————————————————————
  2. # 本脚本来自www.66rpg.com,转载请保留此信息
  3. # ————————————————————————————————————

  4. #==============================================================================
  5. # ■ Window_Help
  6. #------------------------------------------------------------------------------
  7. # 重新定义的内容,可以显示敌人的HP\MP百分比
  8. # 作者:carol3_柳柳
  9. #==============================================================================

  10. class Window_Help < Window_Base
  11.   def set_enemy(actor)
  12.     self.contents.clear
  13.     draw_actor_name(actor, 4, 0)
  14.     draw_actor_state(actor, 140, 0)
  15.     if !actor.is_a(Game_Event) and !true_id(actor.id,[1,2])#这里表示1、2号怪物不显示血条
  16.       carol3_draw_hp_bar(actor, 284, 0)
  17.       carol3_draw_sp_bar(actor, 460, 0)
  18.     end
  19.     @text = nil
  20.     self.visible = true
  21.   end
  22.   def true_id(var = 0,id = [])
  23.     for i in id
  24.       if var == id
  25.         return true
  26.       end
  27.     end
  28.   end
  29.   def carol3_draw_hp_bar(actor, x, y, width = 128) #宽度可调
  30.     self.contents.font.color = system_color
  31.     self.contents.fill_rect(x-1, y+17, width+2,6, Color.new(0, 0, 0, 255))
  32.     w = width * actor.hp / actor.maxhp
  33.     self.contents.fill_rect(x, y+18, w,1, Color.new(255, 96, 96, 255))
  34.     self.contents.fill_rect(x, y+19, w,1, Color.new(255, 0, 0, 255))
  35.     self.contents.fill_rect(x, y+20, w,1, Color.new(128, 0, 0, 255))
  36.     self.contents.fill_rect(x, y+21, w,1, Color.new(0, 0, 0, 255))
  37.     self.contents.draw_text(x,y,128,32,$data_system.words.hp,1)
  38.     self.contents.font.color = normal_color
  39.   end
  40.   def carol3_draw_sp_bar(actor, x, y, width = 128)
  41.     self.contents.font.color = system_color
  42.     self.contents.fill_rect(x-1, y+17, width+2,6, Color.new(0, 0, 0, 255))
  43.     w = width * actor.sp / actor.maxsp
  44.     self.contents.fill_rect(x, y+18, w,1, Color.new(128, 255, 255, 255))
  45.     self.contents.fill_rect(x, y+19, w,1, Color.new(0, 255, 255, 255))
  46.     self.contents.fill_rect(x, y+20, w,1, Color.new(0, 192, 192, 255))
  47.     self.contents.fill_rect(x, y+21, w,1, Color.new(0, 128, 128, 255))
  48.     self.contents.draw_text(x,y,128,32,$data_system.words.sp,1)
  49.     self.contents.font.color = normal_color
  50.   end
  51. end
复制代码
我稍微做了修改,满意了吧。
if !actor.is_a(Game_Event) and !true_id(actor.id,[1,2])#这里表示1、2号怪物不显示血条

点评

↓ 有没有东西覆盖了def set_enemy类似的东西?  发表于 2012-10-1 08:44
hcm
不过为什么我测试了多次都不行呢?  发表于 2012-10-1 08:42

评分

参与人数 1星屑 +100 收起 理由
hcm + 100 感谢回答

查看全部评分

回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-19 07:08

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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