Project1

标题: 【已解决】特技的对象方动画不合理设定 [打印本页]

作者: 阮声悠悠    时间: 2019-1-6 00:25
标题: 【已解决】特技的对象方动画不合理设定
本帖最后由 阮声悠悠 于 2019-3-9 13:07 编辑

设置一个 “效果范围” 为 “敌方全体” 的特技
对应一个动画:动画的位置是“画面”

战斗中释放这个特技,所有对象方都会显示动画,因此,就有N(敌人数量)个动画叠加起来

针对动画位置为“画面”   的情况下,应该只显示一个动画才更合理

应该是要修改这里,想请教一下,应该怎么加判断- -

  1.   #--------------------------------------------------------------------------
  2.   # ● 刷新画面 (主回合步骤 4 : 对像方动画)
  3.   #--------------------------------------------------------------------------
  4.   def update_phase4_step4
  5.     # 对像方动画
  6.     for target in @target_battlers
  7.       target.animation_id = @animation2_id
  8.       target.animation_hit = (target.damage != "Miss")
  9.     end
  10.     # 限制动画长度、最低 8 帧
  11.     @wait_count = 8
  12.     # 移至步骤 5
  13.     @phase4_step = 5
  14.   end
复制代码

作者: 89444640    时间: 2019-1-6 08:49
我也有这个问题,我同一时间还有4个己方待机动画一起刷,掉帧特别厉害。
我是用guoxiaomi的全屏动画脚本,如果动画为全屏,在出手方显示动画,对象方只显示闪烁和受创特效。
缺点,比如雷击会打固定点而不是每个敌人都劈一遍。
我问问菜刀桑有什么好方法没有,用新的方法实现全动画脚本,这个问题早晚也得遇到。
作者: 灯笼菜刀王    时间: 2019-1-6 09:11
嘛, 自己手动添加判定就是了, 比如 在 平砍, 技能, 道具 调用动画的地方, 增加个开关, 当需要只显示一次对象方动画的时候打开它就好了

然后按自己喜欢的方式, case id啦, 备注啦, 属性判断啦 在技能/武器/道具上设置判断操作这个开关就行咯
作者: 张咚咚    时间: 2019-1-6 09:40
本帖最后由 张咚咚 于 2019-1-6 09:44 编辑

第18行,多目标的话画面的动画只会显示一次,记录在@@_animations类变量后,其他的目标是不会重复显示的,应该不存在叠加。


作者: 阮声悠悠    时间: 2019-1-6 17:12
本帖最后由 阮声悠悠 于 2019-1-6 17:49 编辑
灯笼菜刀王 发表于 2019-1-6 09:11
嘛, 自己手动添加判定就是了, 比如 在 平砍, 技能, 道具 调用动画的地方, 增加个开关, 当需要只 ...


有点头绪了……

今天想到一个办法!!想请教一下,怎么用脚本更改某个动画全部贞的透明度

RUBY 代码复制
  1. direnshuliang = 0
  2.     for target in @target_battlers
  3.       direnshuliang += 1
  4.     end
  5.     # 对像方动画
  6.     for target in @target_battlers
  7.       #如果 “对象方的动画” 的位置为 “画面”
  8.       if $data_animations[@animation2_id].position == 3
  9.         #这个动画全体的透明度变为  255/direnshuliang
  10.       end



作者: soulsaga    时间: 2019-1-6 17:23
RUBY 代码复制
  1. for target in @target_battlers
  2. if $data_animations[@animation2_id].position == 3
  3. target.animation_id = @animation2_id
  4. break#中断循环
  5. end
  6. end

作者: 阮声悠悠    时间: 2019-1-7 17:40
自行解决了,分享方法给大家

  1.   #--------------------------------------------------------------------------
  2.   # ● 刷新画面 (主回合步骤 4 : 对像方动画)
  3.   #--------------------------------------------------------------------------
  4.   def update_phase4_step4
  5. #sss[i][0]表示:“全体攻击技能且动画为画面”的动画id,也就是对象方的id
  6. #sss[i][1]表示:第一个敌人以外的敌人,播放的动画,这个动画只需要闪烁就可以了
  7.     sss = [[11,12],[1,2]]
  8.     # 对像方动画
  9.     direnshuliang = 0
  10.     for target in @target_battlers
  11.       if $data_animations[@animation2_id].position == 3#如果 “对象方的动画” 的位置为 “画面”
  12.         direnshuliang += 1
  13.         if direnshuliang == 1
  14.           target.animation_id = @animation2_id
  15.         else
  16.           for i in 0...sss.size
  17.             target.animation_id = sss[i][1] if $data_animations[@animation2_id].id == sss[i][0]
  18.           end
  19.         end
  20.        else
  21.          target.animation_id = @animation2_id
  22.       end
  23.       
  24.       target.animation_hit = (target.damage != "Miss")
  25.      if target.is_a?(Game_Actor)
  26.      end
  27.     end
  28.     # 限制动画长度、最低 8 帧
  29.     @wait_count = 8
  30.     # 移至步骤 5
  31.     @phase4_step = 5
  32.   end
复制代码

作者: LHJH1984    时间: 2019-7-15 19:11
阮声悠悠 发表于 2019-1-7 17:40
自行解决了,分享方法给大家

大佬 你写的 sss = [[11,12],[1,2]] 里面的数值是怎么设定 我是小白就这里看不懂 还望大佬指点




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1