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

Project1

 找回密码
 注册会员
搜索
12
返回列表 发新帖
楼主: 亮F
打印 上一主题 下一主题

大问题,高手快帮帮忙~超级战斗制作

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
55
在线时间
22 小时
注册时间
2006-4-22
帖子
370
11
发表于 2008-8-7 01:27:17 | 只看该作者
你该过之后的Sprite_Battler脚本应该有这么一段
if @battler.is_a?(Game_Actor)
     @nx += 1
     @nx %= 40 #每帧+1,40帧一个循环
     @xbit = @nx / 10 * self.bitmap.width/4 #获得当前的图像坐标
     self.src_rect.set(@xbit, 0, self.bitmap.width/4, self.bitmap.height) #设置当前战斗图的图像
   end

把那个判断去掉了~~~
     
     @nx += 1
     @nx %= 40 #每帧+1,40帧一个循环
     @xbit = @nx / 10 * self.bitmap.width/4 #获得当前的图像坐标
     self.src_rect.set(@xbit, 0, self.bitmap.width/4, self.bitmap.height) #设置当前战斗图的图像
准备有空挖个坑玩玩..
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-6-10
帖子
678
12
 楼主| 发表于 2008-8-7 04:20:38 | 只看该作者
以下引用zhong于2008-8-6 17:27:17的发言:

你该过之后的Sprite_Battler脚本应该有这么一段

if @battler.is_a?(Game_Actor)
    @nx += 1
    @nx %= 40 #每帧+1,40帧一个循环
    @xbit = @nx / 10 * self.bitmap.width/4 #获得当前的图像坐标
    self.src_rect.set(@xbit, 0, self.bitmap.width/4, self.bitmap.height) #设置当前战斗图的图像
  end


把那个判断去掉了~~~

   
    @nx += 1
    @nx %= 40 #每帧+1,40帧一个循环
    @xbit = @nx / 10 * self.bitmap.width/4 #获得当前的图像坐标
    self.src_rect.set(@xbit, 0, self.bitmap.width/4, self.bitmap.height) #设置当前战斗图的图像

按照你说的改了,变成这样
  1. #==============================================================================
  2. # ■ Sprite_Battler
  3. #------------------------------------------------------------------------------
  4. #  战斗显示用活动块。Game_Battler 类的实例监视、
  5. # 活动块的状态的监视。
  6. #==============================================================================

  7. class Sprite_Battler < RPG::Sprite
  8.   #--------------------------------------------------------------------------
  9.   # ● 定义实例变量
  10.   #--------------------------------------------------------------------------
  11.   attr_accessor :battler                  # 战斗者
  12.   #--------------------------------------------------------------------------
  13.   # ● 初始化对像
  14.   #     viewport : 显示端口
  15.   #     battler  : 战斗者 (Game_Battler)
  16.   #--------------------------------------------------------------------------
  17.   def initialize(viewport, battler = nil)
  18.     super(viewport)
  19.     @battler = battler
  20.     @battler_visible = false
  21.     #★★★★★★★★★★★★
  22.     @nx = 0
  23.     @xbit = 0
  24.     #★★★★★★★★★★★★
  25.   end
  26.   #--------------------------------------------------------------------------
  27.   # ● 释放
  28.   #--------------------------------------------------------------------------
  29.   def dispose
  30.     if self.bitmap != nil
  31.       self.bitmap.dispose
  32.     end
  33.     super
  34.   end
  35.   #--------------------------------------------------------------------------
  36.   # ● 刷新画面
  37.   #--------------------------------------------------------------------------
  38.   def update
  39.     super
  40.     # 战斗者为 nil 的情况下
  41.     if @battler == nil
  42.       self.bitmap = nil
  43.       loop_animation(nil)
  44.       return
  45.     end
  46.     # 文件名和色相与当前情况有差异的情况下
  47.    if @battler.battler_name != @battler_name or
  48.       @battler.battler_hue != @battler_hue
  49.      # 获取、设置位图
  50.      @battler_name = @battler.battler_name
  51.      @battler_hue = @battler.battler_hue
  52.      self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
  53.      @width = bitmap.width
  54.      @height = bitmap.height
  55.      self.ox = @width / 2 -130
  56.      self.oy = @height +0
  57.      # 如果是战斗不能或者是隐藏状态就把透明度设置成 0
  58.      if @battler.dead? or @battler.hidden
  59.        self.opacity = 0
  60.      end
  61.    end
  62.    
  63.      @nx += 0
  64.      @nx %= 120 #每帧+1,30帧一个循环
  65.      @xbit = @nx /100* self.bitmap.width/100 #获得当前的图像坐标
  66.      self.src_rect.set(@xbit, 4, self.bitmap.width/2, self.bitmap.height) #设置当前战斗图的图像
  67.    end
  68.    
  69.     #★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
  70.     if @battler.is_a?(Game_Actor)
  71.       @nx += 1
  72.       @nx %= 40
  73.       @xbit = @nx / 10 * self.bitmap.width/4
  74.       self.src_rect.set(@xbit, 0, self.bitmap.width/4, self.bitmap.height)
  75.     end
  76.     #★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
  77.    
  78.     # 动画 ID 与当前的情况有差异的情况下
  79.     if @battler.damage == nil and
  80.        @battler.state_animation_id != @state_animation_id
  81.       @state_animation_id = @battler.state_animation_id
  82.       loop_animation($data_animations[@state_animation_id])
  83.     end
  84.     # 应该被显示的角色的情况下
  85.     if @battler.is_a?(Game_Actor) and @battler_visible
  86.       # 不是主状态的时候稍稍降低点透明度
  87.       if $game_temp.battle_main_phase
  88.         self.opacity += 3 if self.opacity < 255
  89.       else
  90.         self.opacity -= 3 if self.opacity > 207
  91.       end
  92.     end
  93.     # 明灭
  94.     if @battler.blink
  95.       blink_on
  96.     else
  97.       blink_off
  98.     end
  99.     # 不可见的情况下
  100.     unless @battler_visible
  101.       # 出现 ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
  102.       if not @battler.hidden and not @battler.dead? and
  103.          (@battler.damage == nil or @battler.damage_pop)
  104.         if @battler.is_a?(Game_Enemy)
  105.           appear
  106.         else
  107.           @battler.battler_name = @battler.battler_name.split(/★/)[0]
  108.         end
  109.         @battler_visible = true
  110.       end
  111.     end
  112.     # 可见的情况下
  113.     if @battler_visible
  114.       # 逃跑
  115.       if @battler.hidden
  116.         $game_system.se_play($data_system.escape_se)
  117.         escape
  118.         @battler_visible = false
  119.       end
  120.       # 白色闪烁
  121.       if @battler.white_flash
  122.         whiten
  123.         @battler.white_flash = false
  124.       end
  125.       # 动画
  126.       if @battler.animation_id != 0
  127.         animation = $data_animations[@battler.animation_id]
  128.         animation(animation, @battler.animation_hit)
  129.         @battler.animation_id = 0
  130.       end
  131.       # 伤害
  132.       if @battler.damage_pop
  133.         damage(@battler.damage, @battler.critical)
  134.         @battler.damage = nil
  135.         @battler.critical = false
  136.         @battler.damage_pop = false
  137.       end
  138.       # korapusu★★★★★★★★★★★★★★★★★★★★★★★★★★★★
  139.       if @battler.damage == nil and @battler.dead?
  140.         if @battler.is_a?(Game_Enemy)
  141.           $game_system.se_play($data_system.enemy_collapse_se)
  142.           collapse
  143.         else
  144.           $game_system.se_play($data_system.actor_collapse_se)
  145.           @battler.battler_name = @battler.battler_name.split(/★/)[0]
  146.           @battler.battler_name = @battler.battler_name + "★2"
  147.         end
  148.         @battler_visible = false
  149.       end
  150.     end
  151.     # 设置活动块的坐标
  152.     self.x = @battler.screen_x
  153.     self.y = @battler.screen_y
  154.     self.z = @battler.screen_z
  155.   end

复制代码

可是一进入游戏,就提示80行有错误
即是这个 if @battler.damage == nil and
要怎么弄???????
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
22 小时
注册时间
2006-4-22
帖子
370
13
发表于 2008-8-7 06:37:26 | 只看该作者
帮你看了下脚本...我改的地方没错...不过你脚本似乎多了一些不必要的东西,而且最后少了个class的end....那个八十行的错误就是因为你在中间加了一个end,脚本end的个数对了,但其实你那个end的位置错了.....使方法定义提前结束,所以出错了.....帮你改了下...你看看会不会出错...

  1. #==============================================================================
  2. # ■ Sprite_Battler
  3. #------------------------------------------------------------------------------
  4. #  战斗显示用活动块。Game_Battler 类的实例监视、
  5. # 活动块的状态的监视。
  6. #==============================================================================

  7. class Sprite_Battler < RPG::Sprite
  8.   #--------------------------------------------------------------------------
  9.   # ● 定义实例变量
  10.   #--------------------------------------------------------------------------
  11.   attr_accessor :battler                  # 战斗者
  12.   #--------------------------------------------------------------------------
  13.   # ● 初始化对像
  14.   #     viewport : 显示端口
  15.   #     battler  : 战斗者 (Game_Battler)
  16.   #--------------------------------------------------------------------------
  17.   def initialize(viewport, battler = nil)
  18.     super(viewport)
  19.     @battler = battler
  20.     @battler_visible = false
  21.     #★★★★★★★★★★★★
  22.     @nx = 0
  23.     @xbit = 0
  24.     #★★★★★★★★★★★★
  25.   end
  26.   #--------------------------------------------------------------------------
  27.   # ● 释放
  28.   #--------------------------------------------------------------------------
  29.   def dispose
  30.     if self.bitmap != nil
  31.       self.bitmap.dispose
  32.     end
  33.     super
  34.   end
  35.   #--------------------------------------------------------------------------
  36.   # ● 刷新画面
  37.   #--------------------------------------------------------------------------
  38.   def update
  39.     super
  40.     # 战斗者为 nil 的情况下
  41.     if @battler == nil
  42.       self.bitmap = nil
  43.       loop_animation(nil)
  44.       return
  45.     end
  46.     # 文件名和色相与当前情况有差异的情况下
  47.    if @battler.battler_name != @battler_name or
  48.       @battler.battler_hue != @battler_hue
  49.      # 获取、设置位图
  50.      @battler_name = @battler.battler_name
  51.      @battler_hue = @battler.battler_hue
  52.      self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
  53.      @width = bitmap.width
  54.      @height = bitmap.height
  55.      self.ox = @width / 2 -130
  56.      self.oy = @height +0
  57.      # 如果是战斗不能或者是隐藏状态就把透明度设置成 0
  58.      if @battler.dead? or @battler.hidden
  59.        self.opacity = 0
  60.      end
  61.    end
  62.    
  63.    
  64.     #★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
  65.    
  66.       @nx += 1
  67.       @nx %= 40
  68.       @xbit = @nx / 10 * self.bitmap.width/4
  69.       self.src_rect.set(@xbit, 0, self.bitmap.width/4, self.bitmap.height)
  70.    
  71.     #★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
  72.    
  73.     # 动画 ID 与当前的情况有差异的情况下
  74.     if @battler.damage == nil and
  75.        @battler.state_animation_id != @state_animation_id
  76.       @state_animation_id = @battler.state_animation_id
  77.       loop_animation($data_animations[@state_animation_id])
  78.     end
  79.     # 应该被显示的角色的情况下
  80.     if @battler.is_a?(Game_Actor) and @battler_visible
  81.       # 不是主状态的时候稍稍降低点透明度
  82.       if $game_temp.battle_main_phase
  83.         self.opacity += 3 if self.opacity < 255
  84.       else
  85.         self.opacity -= 3 if self.opacity > 207
  86.       end
  87.     end
  88.     # 明灭
  89.     if @battler.blink
  90.       blink_on
  91.     else
  92.       blink_off
  93.     end
  94.     # 不可见的情况下
  95.     unless @battler_visible
  96.       # 出现 ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
  97.       if not @battler.hidden and not @battler.dead? and
  98.          (@battler.damage == nil or @battler.damage_pop)
  99.         if @battler.is_a?(Game_Enemy)
  100.           appear
  101.         else
  102.           @battler.battler_name = @battler.battler_name.split(/★/)[0]
  103.         end
  104.         @battler_visible = true
  105.       end
  106.     end
  107.     # 可见的情况下
  108.     if @battler_visible
  109.       # 逃跑
  110.       if @battler.hidden
  111.         $game_system.se_play($data_system.escape_se)
  112.         escape
  113.         @battler_visible = false
  114.       end
  115.       # 白色闪烁
  116.       if @battler.white_flash
  117.         whiten
  118.         @battler.white_flash = false
  119.       end
  120.       # 动画
  121.       if @battler.animation_id != 0
  122.         animation = $data_animations[@battler.animation_id]
  123.         animation(animation, @battler.animation_hit)
  124.         @battler.animation_id = 0
  125.       end
  126.       # 伤害
  127.       if @battler.damage_pop
  128.         damage(@battler.damage, @battler.critical)
  129.         @battler.damage = nil
  130.         @battler.critical = false
  131.         @battler.damage_pop = false
  132.       end
  133.       # korapusu★★★★★★★★★★★★★★★★★★★★★★★★★★★★
  134.       if @battler.damage == nil and @battler.dead?
  135.         if @battler.is_a?(Game_Enemy)
  136.           $game_system.se_play($data_system.enemy_collapse_se)
  137.           collapse
  138.         else
  139.           $game_system.se_play($data_system.actor_collapse_se)
  140.           @battler.battler_name = @battler.battler_name.split(/★/)[0]
  141.           @battler.battler_name = @battler.battler_name + "★2"
  142.         end
  143.         @battler_visible = false
  144.       end
  145.     end
  146.     # 设置活动块的坐标
  147.     self.x = @battler.screen_x
  148.     self.y = @battler.screen_y
  149.     self.z = @battler.screen_z
  150.   end
  151. end #class
复制代码

系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
准备有空挖个坑玩玩..
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-6-10
帖子
678
14
 楼主| 发表于 2008-8-7 19:23:47 | 只看该作者
以下引用zhong于2008-8-6 22:37:26的发言:

帮你看了下脚本...我改的地方没错...不过你脚本似乎多了一些不必要的东西,而且最后少了个class的end....那个八十行的错误就是因为你在中间加了一个end,脚本end的个数对了,但其实你那个end的位置错了.....使方法定义提前结束,所以出错了.....帮你改了下...你看看会不会出错...
#==============================================================================
# ■ Sprite_Battler
#------------------------------------------------------------------------------
#  战斗显示用活动块。Game_Battler 类的实例监视、
# 活动块的状态的监视。
#==============================================================================

class Sprite_Battler < RPG::Sprite
  #--------------------------------------------------------------------------
  # ● 定义实例变量
  #--------------------------------------------------------------------------
  attr_accessor :battler                  # 战斗者
  #--------------------------------------------------------------------------
  # ● 初始化对像
  #     viewport : 显示端口
  #     battler  : 战斗者 (Game_Battler)
  #--------------------------------------------------------------------------
  def initialize(viewport, battler = nil)
    super(viewport)
    @battler = battler
    @battler_visible = false
    #★★★★★★★★★★★★
    @nx = 0
    @xbit = 0
    #★★★★★★★★★★★★
  end
  #--------------------------------------------------------------------------
  # ● 释放
  #--------------------------------------------------------------------------
  def dispose
    if self.bitmap != nil
      self.bitmap.dispose
    end
    super
  end
  #--------------------------------------------------------------------------
  # ● 刷新画面
  #--------------------------------------------------------------------------
  def update
    super
    # 战斗者为 nil 的情况下
    if @battler == nil
      self.bitmap = nil
      loop_animation(nil)
      return
    end
    # 文件名和色相与当前情况有差异的情况下
   if @battler.battler_name != @battler_name or
      @battler.battler_hue != @battler_hue
     # 获取、设置位图
     @battler_name = @battler.battler_name
     @battler_hue = @battler.battler_hue
     self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
     @width = bitmap.width
     @height = bitmap.height
     self.ox = @width / 2 -130
     self.oy = @height +0
     # 如果是战斗不能或者是隐藏状态就把透明度设置成 0
     if @battler.dead? or @battler.hidden
       self.opacity = 0
     end
   end
   
   
    #★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
   
      @nx += 1
      @nx %= 40
      @xbit = @nx / 10 * self.bitmap.width/4
      self.src_rect.set(@xbit, 0, self.bitmap.width/4, self.bitmap.height)
   
    #★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
   
    # 动画 ID 与当前的情况有差异的情况下
    if @battler.damage == nil and
       @battler.state_animation_id != @state_animation_id
      @state_animation_id = @battler.state_animation_id
      loop_animation($data_animations[@state_animation_id])
    end
    # 应该被显示的角色的情况下
    if @battler.is_a?(Game_Actor) and @battler_visible
      # 不是主状态的时候稍稍降低点透明度
      if $game_temp.battle_main_phase
        self.opacity += 3 if self.opacity < 255
      else
        self.opacity -= 3 if self.opacity > 207
      end
    end
    # 明灭
    if @battler.blink
      blink_on
    else
      blink_off
    end
    # 不可见的情况下
    unless @battler_visible
      # 出现 ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
      if not @battler.hidden and not @battler.dead? and
         (@battler.damage == nil or @battler.damage_pop)
        if @battler.is_a?(Game_Enemy)
          appear
        else
          @battler.battler_name = @battler.battler_name.split(/★/)[0]
        end
        @battler_visible = true
      end
    end
    # 可见的情况下
    if @battler_visible
      # 逃跑
      if @battler.hidden
        $game_system.se_play($data_system.escape_se)
        escape
        @battler_visible = false
      end
      # 白色闪烁
      if @battler.white_flash
        whiten
        @battler.white_flash = false
      end
      # 动画
      if @battler.animation_id != 0
        animation = $data_animations[@battler.animation_id]
        animation(animation, @battler.animation_hit)
        @battler.animation_id = 0
      end
      # 伤害
      if @battler.damage_pop
        damage(@battler.damage, @battler.critical)
        @battler.damage = nil
        @battler.critical = false
        @battler.damage_pop = false
      end
      # korapusu★★★★★★★★★★★★★★★★★★★★★★★★★★★★
      if @battler.damage == nil and @battler.dead?
        if @battler.is_a?(Game_Enemy)
          $game_system.se_play($data_system.enemy_collapse_se)
          collapse
        else
          $game_system.se_play($data_system.actor_collapse_se)
          @battler.battler_name = @battler.battler_name.split(/★/)[0]
          @battler.battler_name = @battler.battler_name + "★2"
        end
        @battler_visible = false
      end
    end
    # 设置活动块的坐标
    self.x = @battler.screen_x
    self.y = @battler.screen_y
    self.z = @battler.screen_z
  end
end #class




[本贴由作者于 2008-8-6 22:38:44 最后编辑]

一进去就显示 内存分配无效~
怎么回事??~
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
60
在线时间
5 小时
注册时间
2008-6-28
帖子
292
15
发表于 2008-8-7 20:06:28 | 只看该作者
你看看你脚本其他的地方有没错误,zhong这个改法是完全正确的,如果不行的话,或者你试试这样:

  1. if @battler.is_a?(Game_Actor)
  2.    @nx += 1
  3.    @nx %= 40 #每帧+1,40帧一个循环
  4.    @xbit = @nx / 10 * self.bitmap.width/4 #获得当前的图像坐标
  5.    self.src_rect.set(@xbit, 0, self.bitmap.width/4, self.bitmap.height) #设置当前战斗图的图像
  6. end
  7. if @battler.is_a?(Game_Enemy)
  8.    @nx += 1
  9.    @nx %= 40 #每帧+1,40帧一个循环
  10.    @xbit = @nx / 10 * self.bitmap.width/4 #获得当前的图像坐标
  11.    self.src_rect.set(@xbit, 0, self.bitmap.width/4, self.bitmap.height) #设置当前战斗图的图像
  12. end
复制代码
这样,呵呵不过是和zhong的改法作用差不多,如果还是不行的话,建议你直接发工程出来,不然谁知道那里冲突呢?
不要小看偶哦~~偶可是雨血2和历史2的主系统哦
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-6-10
帖子
678
16
 楼主| 发表于 2008-8-7 23:39:37 | 只看该作者
以下引用zhong于2008-8-6 22:37:26的发言:

帮你看了下脚本...我改的地方没错...不过你脚本似乎多了一些不必要的东西,而且最后少了个class的end....那个八十行的错误就是因为你在中间加了一个end,脚本end的个数对了,但其实你那个end的位置错了.....使方法定义提前结束,所以出错了.....帮你改了下...你看看会不会出错...
#==============================================================================
# ■ Sprite_Battler
#------------------------------------------------------------------------------
#  战斗显示用活动块。Game_Battler 类的实例监视、
# 活动块的状态的监视。
#==============================================================================

class Sprite_Battler < RPG::Sprite
  #--------------------------------------------------------------------------
  # ● 定义实例变量
  #--------------------------------------------------------------------------
  attr_accessor :battler                  # 战斗者
  #--------------------------------------------------------------------------
  # ● 初始化对像
  #     viewport : 显示端口
  #     battler  : 战斗者 (Game_Battler)
  #--------------------------------------------------------------------------
  def initialize(viewport, battler = nil)
    super(viewport)
    @battler = battler
    @battler_visible = false
    #★★★★★★★★★★★★
    @nx = 0
    @xbit = 0
    #★★★★★★★★★★★★
  end
  #--------------------------------------------------------------------------
  # ● 释放
  #--------------------------------------------------------------------------
  def dispose
    if self.bitmap != nil
      self.bitmap.dispose
    end
    super
  end
  #--------------------------------------------------------------------------
  # ● 刷新画面
  #--------------------------------------------------------------------------
  def update
    super
    # 战斗者为 nil 的情况下
    if @battler == nil
      self.bitmap = nil
      loop_animation(nil)
      return
    end
    # 文件名和色相与当前情况有差异的情况下
   if @battler.battler_name != @battler_name or
      @battler.battler_hue != @battler_hue
     # 获取、设置位图
     @battler_name = @battler.battler_name
     @battler_hue = @battler.battler_hue
     self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
     @width = bitmap.width
     @height = bitmap.height
     self.ox = @width / 2 -130
     self.oy = @height +0
     # 如果是战斗不能或者是隐藏状态就把透明度设置成 0
     if @battler.dead? or @battler.hidden
       self.opacity = 0
     end
   end
   
   
    #★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
   
      @nx += 1
      @nx %= 40
      @xbit = @nx / 10 * self.bitmap.width/4
      self.src_rect.set(@xbit, 0, self.bitmap.width/4, self.bitmap.height)
   
    #★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
   
    # 动画 ID 与当前的情况有差异的情况下
    if @battler.damage == nil and
       @battler.state_animation_id != @state_animation_id
      @state_animation_id = @battler.state_animation_id
      loop_animation($data_animations[@state_animation_id])
    end
    # 应该被显示的角色的情况下
    if @battler.is_a?(Game_Actor) and @battler_visible
      # 不是主状态的时候稍稍降低点透明度
      if $game_temp.battle_main_phase
        self.opacity += 3 if self.opacity < 255
      else
        self.opacity -= 3 if self.opacity > 207
      end
    end
    # 明灭
    if @battler.blink
      blink_on
    else
      blink_off
    end
    # 不可见的情况下
    unless @battler_visible
      # 出现 ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
      if not @battler.hidden and not @battler.dead? and
         (@battler.damage == nil or @battler.damage_pop)
        if @battler.is_a?(Game_Enemy)
          appear
        else
          @battler.battler_name = @battler.battler_name.split(/★/)[0]
        end
        @battler_visible = true
      end
    end
    # 可见的情况下
    if @battler_visible
      # 逃跑
      if @battler.hidden
        $game_system.se_play($data_system.escape_se)
        escape
        @battler_visible = false
      end
      # 白色闪烁
      if @battler.white_flash
        whiten
        @battler.white_flash = false
      end
      # 动画
      if @battler.animation_id != 0
        animation = $data_animations[@battler.animation_id]
        animation(animation, @battler.animation_hit)
        @battler.animation_id = 0
      end
      # 伤害
      if @battler.damage_pop
        damage(@battler.damage, @battler.critical)
        @battler.damage = nil
        @battler.critical = false
        @battler.damage_pop = false
      end
      # korapusu★★★★★★★★★★★★★★★★★★★★★★★★★★★★
      if @battler.damage == nil and @battler.dead?
        if @battler.is_a?(Game_Enemy)
          $game_system.se_play($data_system.enemy_collapse_se)
          collapse
        else
          $game_system.se_play($data_system.actor_collapse_se)
          @battler.battler_name = @battler.battler_name.split(/★/)[0]
          @battler.battler_name = @battler.battler_name + "★2"
        end
        @battler_visible = false
      end
    end
    # 设置活动块的坐标
    self.x = @battler.screen_x
    self.y = @battler.screen_y
    self.z = @battler.screen_z
  end
end #class




[本贴由作者于 2008-8-6 22:38:44 最后编辑]

重新测试了下,不知怎么的就可以了~{/cy}
还有一个前面提到的问题
我弄的敌人只有待机图~
有没办法让敌人死亡的时候是渐变消失的~???

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
60
在线时间
5 小时
注册时间
2008-6-28
帖子
292
17
发表于 2008-8-12 19:12:26 | 只看该作者
用多动画叠加脚本,死亡动画用数据库动画设定就可以了,在死亡时调用死亡动画,你想怎么搞都可以
不要小看偶哦~~偶可是雨血2和历史2的主系统哦
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-7-27 19:17

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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