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

Project1

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

谁有融合版RTAB战斗系统用的血条脚本?

 关闭 [复制链接]

Lv3.寻梦者

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-12-10
帖子
4
跳转到指定楼层
1
发表于 2009-1-7 02:25:19 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
问同标题.
由于源生RTAB系统把原始脚本替换了很多,刚学到的血条显示方式无法使用,所以来问问不知道这里有没人有,还有,请不要问我是不是真的...{/gg}


又或者,谁告诉我,应该在什么地方插入调用
定义部分是这样的

def HP(actor,x,y,w=96)
    self.contents.fill_rect(x-2,y+26,w+4,8,Color.new(150, 150, 55, 255))
    self.contents.fill_rect(x-1,y+27,w+2,6,Color.new(0,0,0,255))
    self.contents.fill_rect(x,y+28,w,4,Color.new(173,233,177,255))
    w1 = w * actor.hp / actor.maxhp
    self.contents.fill_rect(x,y+28,w1,2,Color.new(255,0,0,255))
    self.contents.fill_rect(x,y+28,w1,3,Color.new(255,0,0,150))
    self.contents.fill_rect(x,y+28,w1,4,Color.new(255,0,0,100))
  end  
  
  
  
def MP(actor,x,y,w=96)
    self.contents.fill_rect(x-2,y+56,w+4,8,Color.new(150, 150, 55, 255))
    self.contents.fill_rect(x-1,y+57,w+2,6,Color.new(0,0,0,255))
    self.contents.fill_rect(x,y+58,w,4,Color.new(173,233,177,255))
    w1 = w * actor.sp / actor.maxsp
    self.contents.fill_rect(x,y+58,w1,2,Color.new(255,0,0,255))
    self.contents.fill_rect(x,y+58,w1,3,Color.new(255,0,0,150))
    self.contents.fill_rect(x,y+58,w1,4,Color.new(255,0,0,100))
  end  
  



恩,,,对,需要找一个地方插入,但是源生RTAB系统的Window_BattleStatus栏里内容已经被完全替换.样式如下
#==============================================================================
# ■ Window_DetailsStatus
#------------------------------------------------------------------------------
#  バトル画面でアクターのステータスを個々に表示するウィンドウです。
#==============================================================================

class Window_DetailsStatus < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize(actor, id, x)
    @status_id = id
    super(x, 320 + id * 26, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = 0
    self.back_opacity = 0
    refresh(actor, false)
  end
  #--------------------------------------------------------------------------
  # ● 解放
  #--------------------------------------------------------------------------
  def dispose
    super
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh(actor, level_up_flags = false)
    self.contents.clear
    case @status_id
    when 0
      draw_actor_name(actor, 4, 0)
    when 1
      draw_actor_hp(actor, 4, 0, 120)
    when 2
      draw_actor_sp(actor, 4, 0, 120)
    when 3
      if level_up_flags
        self.contents.font.color = normal_color
        self.contents.draw_text(4, 0, 120, 32, "LEVEL UP!")
      else
        draw_actor_state(actor, 4, 0)
      end
    when 4
      draw_actor_atg(actor, 4, 0, 120)
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  def update
    # メインフェーズのときは不透明度をやや下げる
    if $game_temp.battle_main_phase
      self.contents_opacity -= 4 if self.contents_opacity > 191
    else
      self.contents_opacity += 4 if self.contents_opacity < 255
    end
  end
end



------------------------------------------------------------
本应在Window_BattleStatus内插入的样式如下

  #--------------------------------------------------------------------------
  # ● 刷新
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      actor = $game_party.actors
      actor_x = i * 160 + 4
      draw_actor_name(actor, actor_x, 0)
      HP(actor,actor_x,10+8,w=90)#调用了被定义的"HP"######################
      MP(actor,actor_x,10+8,w=70)#调用了被定义的"MP"######################
      draw_actor_hp(actor, actor_x, 32, 120)
      draw_actor_sp(actor, actor_x, 64, 120)
      if @level_up_flags
        self.contents.font.color = normal_color
        self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
      else
        draw_actor_state(actor, actor_x, 96)
      end
    end
  end



源生RTAB系统下载地址:
http://rpg.blue/web/htm/news49.htm
版务信息:本贴由楼主自主结贴~
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2006-5-13
帖子
138
2
发表于 2009-1-7 05:51:29 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-12-10
帖子
4
3
 楼主| 发表于 2009-1-7 06:26:54 | 只看该作者
3KS,已经解决,现在调试坐标中...
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-7-23 20:12

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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