查看: 1163|回复: 3

从坟堆里爬出来请教个关于XP齐时战斗的问题……

  [复制链接]
梦石
1
星屑
5596
在线时间
456 小时
注册时间
2006-1-31
回帖
1409
发表于 2008-12-31 06:23:15 | 显示全部楼层 |阅读模式

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

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

×
原脚本是柳柳君的这帖,http://rpg.blue/web/htm/news63.htm

在使用时有个问题,假定一个增益技能对自己释放的话,这个脚本只会播放对象方动画,使用方动画会被略过。之前美兽殿曾经指点过,把脚本改成这样:

  1. #--------------------------------------------------------------------------
  2. # ● 刷新画面 (主回合步骤 3 : 行动方动画)
  3. #--------------------------------------------------------------------------
  4. def update_phase4_step3
  5.    # 行动方动画 (ID 为 0 的情况下是白色闪烁)
  6.    if @animation1_id == 0
  7.      @active_battler.white_flash = true
  8.    else
  9.      @active_battler.animation_id = @animation1_id
  10.      @active_battler.animation_hit = true
  11.    end   
  12.    # 对像方动画
  13.    for target in @target_battlers
  14.      if @active_battler.is_a?(Game_Actor) and target.is_a?(Game_Actor) and
  15.         @active_battler.id == target.id
  16.         target.animation_id = @animation1_id           
  17.      else  
  18.         target.animation_id = @animation2_id
  19.         target.animation_hit = (target.damage != "Miss")         
  20.      end      
  21.    end
  22.    # 移至步骤 4
  23.    @phase4_step = 4
  24. end
  25. #--------------------------------------------------------------------------
  26. # ● 刷新画面 (主回合步骤 4 : 对像方动画)
  27. #--------------------------------------------------------------------------
  28. def update_phase4_step4
  29.    # 对像方动画
  30.    for target in @target_battlers
  31.      if @active_battler.is_a?(Game_Actor) and target.is_a?(Game_Actor) and
  32.         @active_battler.id == target.id
  33.         target.animation_id = @animation2_id  
  34.         target.animation_hit = (target.damage != "Miss")        
  35.      end  
  36.    end   
  37.    # 限制动画长度、最低 8 帧
  38.    @wait_count = 8
  39.    # 移至步骤 5
  40.    @phase4_step = 5
  41. end
复制代码


但这个样子也有个缺点——敌人在对自己使用增益魔法的时候还是不会显示使用方动画。而且这个解决方法也并不是很完美,动画一会儿是同步显示一会儿又不是,流畅感大打折扣。望高手帮忙看看是否有更好的方法。感谢。

已有战斗脚本:CTB横版战斗系统,彩虹神剑,战斗特效(脚本版),敌残余战力表示,战斗终了时能力成长,战后回复。(未发现冲突)
版务信息:本贴由楼主自主结贴~

綾川司の姫様<

梦石
0
星屑
50
在线时间
796 小时
注册时间
2007-12-20
回帖
4461

贵宾第3届短篇游戏大赛R剧及RMTV组亚军

发表于 2008-12-31 10:09:53 | 显示全部楼层
S大~!{/se}你的维纳利斯传说是俺的偶像啊~!{/hx}来到6R第二个游戏玩的就是那个,非常佩服那时候就能写出那么好剧本的您XDDD

咳咳……跑题了……
其实换成敌人的话似乎也差不多,同样的if语句复制粘贴一份出来改成Enemy看看?主要就是一个判断的部分:

#--------------------------------------------------------------------------
# ● 刷新画面 (主回合步骤 3 : 行动方动画)
#--------------------------------------------------------------------------
def update_phase4_step3
   # 行动方动画 (ID 为 0 的情况下是白色闪烁)
   if @animation1_id == 0
     @active_battler.white_flash = true
   else
     @active_battler.animation_id = @animation1_id
     @active_battler.animation_hit = true
   end   
   # 对像方动画
   for target in @target_battlers
     if @active_battler.is_a?(Game_Actor) and target.is_a?(Game_Actor) and
        @active_battler.id == target.id
        target.animation_id = @animation1_id           
     elsif
       @active_battler.is_a?(Game_Enemy) and target.is_a?(Game_Enemy) and @active_battler.id == target.id
        target.animation_id = @animation1_id
      else  
        target.animation_id = @animation2_id
        target.animation_hit = (target.damage != "Miss")         
     end      
   end
   # 移至步骤 4
   @phase4_step = 4
end
#--------------------------------------------------------------------------
# ● 刷新画面 (主回合步骤 4 : 对像方动画)
#--------------------------------------------------------------------------
def update_phase4_step4
   # 对像方动画
   for target in @target_battlers
     if @active_battler.is_a?(Game_Actor) and target.is_a?(Game_Actor) and
        @active_battler.id == target.id
        target.animation_id = @animation2_id  
        target.animation_hit = (target.damage != "Miss")
     elsif
        @active_battler.is_a?(Game_Enemy) and target.is_a?(Game_Enemy) and
        @active_battler.id == target.id
        target.animation_id = @animation2_id  
        target.animation_hit = (target.damage != "Miss")
     end  
   end   
   # 限制动画长度、最低 8 帧
   @wait_count = 8
   # 移至步骤 5
   @phase4_step = 5
end


目前暂时没时间测试效果做工程……orz如果出Syntax错误请加End||||
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~

生命即是责任。自己即是世界。
回复

使用道具 举报

头像被屏蔽

lov Peii 4ever

梦石
0
星屑
50
在线时间
1 小时
注册时间
2008-10-28
回帖
415
发表于 2008-12-31 17:25:45 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复

使用道具 举报

梦石
1
星屑
5596
在线时间
456 小时
注册时间
2006-1-31
回帖
1409
 楼主| 发表于 2008-12-31 20:28:08 | 显示全部楼层
感谢,已经解决。{/ka}
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部