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

Project1

 找回密码
 注册会员
搜索
查看: 4030|回复: 13

[已经解决] 向各位前辈请教一下关于战斗中的一些小东西

[复制链接]

Lv1.梦旅人

梦石
0
星屑
55
在线时间
59 小时
注册时间
2007-7-31
帖子
711
发表于 2010-7-25 08:56:46 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x

恳请大家先看一副这幅图片,我想在左面,也就是我所画的地方添加上敌人战斗图以及敌人血槽,位置就在我所画的地方,请问一下,通过脚本如何就能够实现?
急招打字员、游戏评测员、淘宝客服、拍单客服、手机兼职员等职位,有想赚钱的亲们,加QQ:960296464

Lv1.梦旅人

梦石
0
星屑
55
在线时间
59 小时
注册时间
2007-7-31
帖子
711
 楼主| 发表于 2010-7-25 09:52:06 | 显示全部楼层
各位,你们能帮帮我么
急招打字员、游戏评测员、淘宝客服、拍单客服、手机兼职员等职位,有想赚钱的亲们,加QQ:960296464
回复 支持 反对

使用道具 举报

Lv1.梦旅人

西尼克·麦吉

梦石
0
星屑
49
在线时间
15 小时
注册时间
2010-7-19
帖子
441
发表于 2010-7-25 17:11:25 | 显示全部楼层
很少有人这样用的,自己学脚本自己写把(我也不会)

BTW:那个幽灵是欧洲中世纪的,你觉得放那儿合适吗?
我其实是来吧经验凑整的

想联系我请找此号:觉醒の赤翼
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
59 小时
注册时间
2007-7-31
帖子
711
 楼主| 发表于 2010-7-25 17:23:57 | 显示全部楼层
很少有人这样用的,自己学脚本自己写把(我也不会)

BTW:那个幽灵是欧洲中世纪的,你觉得放那儿合适吗? ...
rmg_mage 发表于 2010-7-25 17:11

这只是一个战斗小测试,因为是脚本盲嘛,所以才……


回复 支持 反对

使用道具 举报

Lv3.寻梦者

宛若

梦石
0
星屑
1553
在线时间
526 小时
注册时间
2007-8-19
帖子
1493

极短24参与开拓者

发表于 2010-7-25 19:44:14 | 显示全部楼层
  1. class Window_BattleEnemy < Window_Base
  2.   def initialize(enemy = nil)
  3.     @enemy = enemy
  4.     super(0,64,160,120)
  5.     self.contents = Bitmap.new(width - 32, height - 32)
  6.     refresh
  7.   end
  8.   def refresh
  9.     self.contents.clear
  10.     draw_actor_battler(@enemy, 0, 0) if @enemy != nil
  11.     carol3_draw_hp_bar(@enemy , 160 - 32 - 128 , 0) if @enemy != nil
  12.   end
  13.   def enemy=(e)
  14.     @enemy = e
  15.     refresh
  16.   end
  17.   def draw_actor_battler(actor, x, y)
  18.     bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
  19.     cw = bitmap.width
  20.     ch = bitmap.height
  21.     src_rect = Rect.new(0, 0, cw, ch)
  22.     self.contents.blt(x, y, bitmap, src_rect)
  23.   end
  24.   def carol3_draw_hp_bar(actor, x, y, width = 128) #宽度可调
  25.    self.contents.font.color = system_color
  26.    w = width * actor.hp / [actor.maxhp,1].max
  27.    if actor.maxhp != 0
  28.      rate = actor.hp.to_f / actor.maxhp
  29.    else
  30.      rate = 0
  31.    end
  32.    color1 = Color.new(240 - 72 * rate, 240 * rate, 62 * rate, 150)
  33.    self.contents.fill_rect(x+1, y+15, width+2,1, Color.new(0, 0, 0, 255))
  34.    self.contents.fill_rect(x+1, y+16, width+2,1, Color.new(255, 255, 192, 192))
  35.    self.contents.fill_rect(x+1, y+17, w,6,color1)
  36.    self.contents.fill_rect(x+1, y+23, width+2,1, Color.new(255, 255, 192, 192))
  37.    self.contents.fill_rect(x+1, y+24, width+2,1, Color.new(0, 0, 0, 255))
  38.    self.contents.fill_rect(x, y+16, 1,8, Color.new(255, 255, 192, 192))
  39.    self.contents.fill_rect(x-1, y+15, 1,10, Color.new(0, 0, 0, 255))
  40.    self.contents.fill_rect(x+129, y+16, 1,8, Color.new(255, 255, 192, 192))
  41.    self.contents.fill_rect(x+130, y+15, 1,10, Color.new(0, 0, 0, 255))
  42.    self.contents.draw_text(x-53,y,128,32,$data_system.words.hp,1)
  43.    if actor.hp>actor.maxhp/3
  44.      self.contents.font.color = Color.new(255, 255, 255, 250)
  45.    end
  46.    if actor.hp>=actor.maxhp/6 and actor.maxhp/3>actor.hp
  47.      self.contents.font.color = Color.new(200, 200, 0, 255)
  48.    end
  49.    if actor.maxhp/6>actor.hp
  50.      self.contents.font.color = Color.new(200, 0, 0, 255)
  51.    end
  52.    self.contents.draw_text(x+47,y,128,32,actor.hp.to_s,1)
  53.   end
  54.   def carol3_draw_sp_bar(actor, x, y, width = 128)
  55.    self.contents.font.color = system_color
  56.    if actor.maxsp != 0
  57.      rate = actor.sp.to_f / actor.maxsp
  58.    else
  59.      rate = 0
  60.    end
  61.    color2 = Color.new(62 * rate, 240 - 72 * rate, 240 * rate, 192)
  62.    w = width * actor.sp / [actor.maxsp,1].max
  63.    self.contents.fill_rect(x+1, y+15, width+2,1, Color.new(0, 0, 0, 255))
  64.    self.contents.fill_rect(x+1, y+16, width+2,1, Color.new(255, 255, 192, 192))
  65.    self.contents.fill_rect(x+1, y+17, w,6,color2)
  66.    self.contents.fill_rect(x+1, y+23, width+2,1, Color.new(255, 255, 192, 192))
  67.    self.contents.fill_rect(x+1, y+24, width+2,1, Color.new(0, 0, 0, 255))
  68.    self.contents.fill_rect(x, y+16, 1,8, Color.new(255, 255, 192, 192))
  69.    self.contents.fill_rect(x-1, y+15, 1,10, Color.new(0, 0, 0, 255))
  70.    self.contents.fill_rect(x+129, y+16, 1,8, Color.new(255, 255, 192, 192))
  71.    self.contents.fill_rect(x+130, y+15, 1,10, Color.new(0, 0, 0, 255))
  72.    self.contents.draw_text(x-53,y,128,32,$data_system.words.sp,1)
  73.    if actor.hp>actor.maxsp/3
  74.      self.contents.font.color = Color.new(255, 255, 255, 250)
  75.    end
  76.    if actor.hp>=actor.maxsp/6 and actor.maxsp/3>actor.sp
  77.      self.contents.font.color = Color.new(200, 200, 0, 255)
  78.    end
  79.    if actor.maxsp/6>actor.sp
  80.      self.contents.font.color = Color.new(200, 0, 0, 255)
  81.    end
  82.    self.contents.draw_text(x+47,y,128,32,actor.sp.to_s,1)
  83.   end
  84. end
  85. class Scene_Battle
  86.   alias main_6r main
  87.   def main
  88.     @be_window = Window_BattleEnemy.new
  89.     @be_window.back_opacity = 160
  90.     main_6r
  91.     @be_window.dispose
  92.   end
  93.   alias upes update_phase3_enemy_select
  94.   def update_phase3_enemy_select
  95.     upes
  96.     unless Input.trigger?(Input::C) or Input.trigger?(Input::B)
  97.       @be_window.enemy = $game_troop.enemies[@enemy_arrow.index]
  98.     else
  99.       @be_window.enemy = nil
  100.     end
  101.   end
  102. end
复制代码
[url=http://rpg.blue/thread-219730-1-1.html]http://unhero.sinaapp.com/wi.php[/url]
[color=Red]如你所见这是个死坑,没错这就是打我的脸用的[/color]
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
59 小时
注册时间
2007-7-31
帖子
711
 楼主| 发表于 2010-7-25 21:14:55 | 显示全部楼层
感谢,但是在RMXP1.03中显示不出来,我用的是1.03版的,能请求修改一下么
急招打字员、游戏评测员、淘宝客服、拍单客服、手机兼职员等职位,有想赚钱的亲们,加QQ:960296464
回复 支持 反对

使用道具 举报

Lv3.寻梦者

宛若

梦石
0
星屑
1553
在线时间
526 小时
注册时间
2007-8-19
帖子
1493

极短24参与开拓者

发表于 2010-7-25 21:36:04 | 显示全部楼层
这个貌似跟RMXP的版本无关吧= =|||
怀疑是脚本冲突,提供工程
[url=http://rpg.blue/thread-219730-1-1.html]http://unhero.sinaapp.com/wi.php[/url]
[color=Red]如你所见这是个死坑,没错这就是打我的脸用的[/color]
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
59 小时
注册时间
2007-7-31
帖子
711
 楼主| 发表于 2010-7-26 12:16:04 | 显示全部楼层
急招打字员、游戏评测员、淘宝客服、拍单客服、手机兼职员等职位,有想赚钱的亲们,加QQ:960296464
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
3 小时
注册时间
2009-8-4
帖子
73
发表于 2010-7-26 12:50:24 | 显示全部楼层
本帖最后由 wuliao1997 于 2010-7-26 13:42 编辑

LZ你不是已经整合好了吗....
只要再调一下XY的值:(基本上是这个大小)super(90,390,140,90)
再加上这句以免被战斗框挡住self.z = 9999
再修改血条位置和大小就可以了...
(PS:LZ你想再做一个上古神器2么...还有啊……妮可99级佩戴那剑每次打幽灵都是失误...你是咋设置的...每次都请重新再来...)
----------------------------------------------------------------------------
更改后的范例:http://u.115.com/file/f21006ecc5

点评

编辑完毕。自己下载吧。  发表于 2010-7-26 13:43
呵呵,那是瞎设置的,不用,你能上个范例么?  发表于 2010-7-26 12:53
很不错的横版,先收下了  发表于 2010-7-26 12:51
此人遗失...
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
59 小时
注册时间
2007-7-31
帖子
711
 楼主| 发表于 2010-7-26 12:54:16 | 显示全部楼层
呵呵,就是因为我不懂这些,所以才……
急招打字员、游戏评测员、淘宝客服、拍单客服、手机兼职员等职位,有想赚钱的亲们,加QQ:960296464
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-19 01:59

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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